Skip to content

Commit 0f8a9da

Browse files
committed
Use the python3 names in docstrings
`collections.X` => `collections.abc.X` so links in docs work better
1 parent c915137 commit 0f8a9da

File tree

3 files changed

+31
-31
lines changed

3 files changed

+31
-31
lines changed

sass.py

+24-24
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@
3535
libsass_version = _sass.libsass_version
3636

3737

38-
#: (:class:`collections.Mapping`) The dictionary of output styles.
38+
#: (:class:`collections.abc.Mapping`) The dictionary of output styles.
3939
#: Keys are output name strings, and values are flag integers.
4040
OUTPUT_STYLES = _sass.OUTPUT_STYLES
4141

42-
#: (:class:`collections.Mapping`) The dictionary of source comments styles.
42+
#: (:class:`collections.abc.Mapping`) The dictionary of source comments styles.
4343
#: Keys are mode names, and values are corresponding flag integers.
4444
#:
4545
#: .. versionadded:: 0.4.0
4646
#:
4747
#: .. deprecated:: 0.6.0
4848
SOURCE_COMMENTS = {'none': 0, 'line_numbers': 1, 'default': 1, 'map': 2}
4949

50-
#: (:class:`collections.Set`) The set of keywords :func:`compile()` can take.
51-
MODES = set(['string', 'filename', 'dirname'])
50+
#: (:class:`frozenset`) The set of keywords :func:`compile()` can take.
51+
MODES = frozenset(('string', 'filename', 'dirname'))
5252

5353

5454
def to_native_s(s):
@@ -83,9 +83,9 @@ class SassFunction(object):
8383
:param name: the function name
8484
:type name: :class:`str`
8585
:param arguments: the argument names
86-
:type arguments: :class:`collections.Sequence`
86+
:type arguments: :class:`collections.abc.Sequence`
8787
:param callable_: the actual function to be called
88-
:type callable_: :class:`collections.Callable`
88+
:type callable_: :class:`collections.abc.Callable`
8989
9090
.. versionadded:: 0.7.0
9191
@@ -283,23 +283,23 @@ def compile(**kwargs):
283283
:type source_comments: :class:`bool`
284284
:param include_paths: an optional list of paths to find ``@import``\ ed
285285
Sass/CSS source files
286-
:type include_paths: :class:`collections.Sequence`
286+
:type include_paths: :class:`collections.abc.Sequence`
287287
:param precision: optional precision for numbers. :const:`5` by default.
288288
:type precision: :class:`int`
289289
:param custom_functions: optional mapping of custom functions.
290290
see also below `custom functions
291291
<custom-functions_>`_ description
292-
:type custom_functions: :class:`collections.Set`,
293-
:class:`collections.Sequence`,
294-
:class:`collections.Mapping`
292+
:type custom_functions: :class:`set`,
293+
:class:`collections.abc.Sequence`,
294+
:class:`collections.abc.Mapping`
295295
:param indented: optional declaration that the string is Sass, not SCSS
296296
formatted. :const:`False` by default
297297
:type indented: :class:`bool`
298298
:returns: the compiled CSS string
299299
:param importers: optional callback functions.
300300
see also below `importer callbacks
301301
<importer-callbacks_>`_ description
302-
:type importers: :class:`collections.Callable`
302+
:type importers: :class:`collections.abc.Callable`
303303
:rtype: :class:`str`
304304
:raises sass.CompileError: when it fails for any reason
305305
(for example the given Sass has broken syntax)
@@ -323,19 +323,19 @@ def compile(**kwargs):
323323
:type source_map_filename: :class:`str`
324324
:param include_paths: an optional list of paths to find ``@import``\ ed
325325
Sass/CSS source files
326-
:type include_paths: :class:`collections.Sequence`
326+
:type include_paths: :class:`collections.abc.Sequence`
327327
:param precision: optional precision for numbers. :const:`5` by default.
328328
:type precision: :class:`int`
329329
:param custom_functions: optional mapping of custom functions.
330330
see also below `custom functions
331331
<custom-functions_>`_ description
332-
:type custom_functions: :class:`collections.Set`,
333-
:class:`collections.Sequence`,
334-
:class:`collections.Mapping`
332+
:type custom_functions: :class:`set`,
333+
:class:`collections.abc.Sequence`,
334+
:class:`collections.abc.Mapping`
335335
:param importers: optional callback functions.
336336
see also below `importer callbacks
337337
<importer-callbacks_>`_ description
338-
:type importers: :class:`collections.Callable`
338+
:type importers: :class:`collections.abc.Callable`
339339
:returns: the compiled CSS string, or a pair of the compiled CSS string
340340
and the source map string if ``source_map_filename`` is set
341341
:rtype: :class:`str`, :class:`tuple`
@@ -365,23 +365,23 @@ def compile(**kwargs):
365365
:type source_comments: :class:`bool`
366366
:param include_paths: an optional list of paths to find ``@import``\ ed
367367
Sass/CSS source files
368-
:type include_paths: :class:`collections.Sequence`
368+
:type include_paths: :class:`collections.abc.Sequence`
369369
:param precision: optional precision for numbers. :const:`5` by default.
370370
:type precision: :class:`int`
371371
:param custom_functions: optional mapping of custom functions.
372372
see also below `custom functions
373373
<custom-functions_>`_ description
374-
:type custom_functions: :class:`collections.Set`,
375-
:class:`collections.Sequence`,
376-
:class:`collections.Mapping`
374+
:type custom_functions: :class:`set`,
375+
:class:`collections.abc.Sequence`,
376+
:class:`collections.abc.Mapping`
377377
:raises sass.CompileError: when it fails for any reason
378378
(for example the given Sass has broken syntax)
379379
380380
.. _custom-functions:
381381
382382
The ``custom_functions`` parameter can take three types of forms:
383383
384-
:class:`~collections.Set`/:class:`~collections.Sequence` of \
384+
:class:`~set`/:class:`~collections.abc.Sequence` of \
385385
:class:`SassFunction`\ s
386386
It is the most general form. Although pretty verbose, it can take
387387
any kind of callables like type objects, unnamed functions,
@@ -397,7 +397,7 @@ def compile(**kwargs):
397397
}
398398
)
399399
400-
:class:`~collections.Mapping` of names to functions
400+
:class:`~collections.abc.Mapping` of names to functions
401401
Less general, but easier-to-use form. Although it's not it can take
402402
any kind of callables, it can take any kind of *functions* defined
403403
using :keyword:`def`/:keyword:`lambda` syntax.
@@ -414,7 +414,7 @@ def compile(**kwargs):
414414
}
415415
)
416416
417-
:class:`~collections.Set`/:class:`~collections.Sequence` of \
417+
:class:`~set`/:class:`~collections.abc.Sequence` of \
418418
named functions
419419
Not general, but the easiest-to-use form for *named* functions.
420420
It can take only named functions, defined using :keyword:`def`.
@@ -647,7 +647,7 @@ def and_join(strings):
647647
'Korea, Japan, China, and Taiwan'
648648
649649
:param strings: a list of words to join
650-
:type string: :class:`collections.Sequence`
650+
:type string: :class:`collections.abc.Sequence`
651651
:returns: a joined string
652652
:rtype: :class:`str`, :class:`basestring`
653653

sassutils/builder.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
__all__ = 'SUFFIXES', 'SUFFIX_PATTERN', 'Manifest', 'build_directory'
1818

1919

20-
#: (:class:`collections.Set`) The set of supported filename suffixes.
21-
SUFFIXES = frozenset(['sass', 'scss'])
20+
#: (:class:`frozenset`) The set of supported filename suffixes.
21+
SUFFIXES = frozenset(('sass', 'scss'))
2222

2323
#: (:class:`re.RegexObject`) The regular expression pattern which matches to
2424
#: filenames of supported :const:`SUFFIXES`.
@@ -39,7 +39,7 @@ def build_directory(sass_path, css_path, output_style='nested',
3939
``'compact'``, ``'compressed'``
4040
:type output_style: :class:`str`
4141
:returns: a dictionary of source filenames to compiled CSS filenames
42-
:rtype: :class:`collections.Mapping`
42+
:rtype: :class:`collections.abc.Mapping`
4343
4444
.. versionadded:: 0.6.0
4545
The ``output_style`` parameter.
@@ -165,7 +165,7 @@ def build(self, package_dir, output_style='nested'):
165165
``'expanded'``, ``'compact'``, ``'compressed'``
166166
:type output_style: :class:`str`
167167
:returns: the set of compiled CSS filenames
168-
:rtype: :class:`collections.Set`
168+
:rtype: :class:`frozenset`
169169
170170
.. versionadded:: 0.6.0
171171
The ``output_style`` parameter.

sassutils/wsgi.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ class SassMiddleware(object):
6969
logging.basicConfig()
7070
7171
:param app: the WSGI application to wrap
72-
:type app: :class:`collections.Callable`
72+
:type app: :class:`collections.abc.Callable`
7373
:param manifests: build settings. the same format to
7474
:file:`setup.py` script's ``sass_manifests``
7575
option
76-
:type manifests: :class:`collections.Mapping`
76+
:type manifests: :class:`collections.abc.Mapping`
7777
:param package_dir: optional mapping of package names to directories.
7878
the same format to :file:`setup.py` script's
7979
``package_dir`` option
80-
:type package_dir: :class:`collections.Mapping`
80+
:type package_dir: :class:`collections.abc.Mapping`
8181
8282
.. versionchanged:: 0.4.0
8383
It creates also source map files with filenames followed by

0 commit comments

Comments
 (0)