35
35
libsass_version = _sass .libsass_version
36
36
37
37
38
- #: (:class:`collections.Mapping`) The dictionary of output styles.
38
+ #: (:class:`collections.abc. Mapping`) The dictionary of output styles.
39
39
#: Keys are output name strings, and values are flag integers.
40
40
OUTPUT_STYLES = _sass .OUTPUT_STYLES
41
41
42
- #: (:class:`collections.Mapping`) The dictionary of source comments styles.
42
+ #: (:class:`collections.abc. Mapping`) The dictionary of source comments styles.
43
43
#: Keys are mode names, and values are corresponding flag integers.
44
44
#:
45
45
#: .. versionadded:: 0.4.0
46
46
#:
47
47
#: .. deprecated:: 0.6.0
48
48
SOURCE_COMMENTS = {'none' : 0 , 'line_numbers' : 1 , 'default' : 1 , 'map' : 2 }
49
49
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' ) )
52
52
53
53
54
54
def to_native_s (s ):
@@ -83,9 +83,9 @@ class SassFunction(object):
83
83
:param name: the function name
84
84
:type name: :class:`str`
85
85
:param arguments: the argument names
86
- :type arguments: :class:`collections.Sequence`
86
+ :type arguments: :class:`collections.abc. Sequence`
87
87
:param callable_: the actual function to be called
88
- :type callable_: :class:`collections.Callable`
88
+ :type callable_: :class:`collections.abc. Callable`
89
89
90
90
.. versionadded:: 0.7.0
91
91
@@ -283,23 +283,23 @@ def compile(**kwargs):
283
283
:type source_comments: :class:`bool`
284
284
:param include_paths: an optional list of paths to find ``@import``\ ed
285
285
Sass/CSS source files
286
- :type include_paths: :class:`collections.Sequence`
286
+ :type include_paths: :class:`collections.abc. Sequence`
287
287
:param precision: optional precision for numbers. :const:`5` by default.
288
288
:type precision: :class:`int`
289
289
:param custom_functions: optional mapping of custom functions.
290
290
see also below `custom functions
291
291
<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`
295
295
:param indented: optional declaration that the string is Sass, not SCSS
296
296
formatted. :const:`False` by default
297
297
:type indented: :class:`bool`
298
298
:returns: the compiled CSS string
299
299
:param importers: optional callback functions.
300
300
see also below `importer callbacks
301
301
<importer-callbacks_>`_ description
302
- :type importers: :class:`collections.Callable`
302
+ :type importers: :class:`collections.abc. Callable`
303
303
:rtype: :class:`str`
304
304
:raises sass.CompileError: when it fails for any reason
305
305
(for example the given Sass has broken syntax)
@@ -323,19 +323,19 @@ def compile(**kwargs):
323
323
:type source_map_filename: :class:`str`
324
324
:param include_paths: an optional list of paths to find ``@import``\ ed
325
325
Sass/CSS source files
326
- :type include_paths: :class:`collections.Sequence`
326
+ :type include_paths: :class:`collections.abc. Sequence`
327
327
:param precision: optional precision for numbers. :const:`5` by default.
328
328
:type precision: :class:`int`
329
329
:param custom_functions: optional mapping of custom functions.
330
330
see also below `custom functions
331
331
<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`
335
335
:param importers: optional callback functions.
336
336
see also below `importer callbacks
337
337
<importer-callbacks_>`_ description
338
- :type importers: :class:`collections.Callable`
338
+ :type importers: :class:`collections.abc. Callable`
339
339
:returns: the compiled CSS string, or a pair of the compiled CSS string
340
340
and the source map string if ``source_map_filename`` is set
341
341
:rtype: :class:`str`, :class:`tuple`
@@ -365,23 +365,23 @@ def compile(**kwargs):
365
365
:type source_comments: :class:`bool`
366
366
:param include_paths: an optional list of paths to find ``@import``\ ed
367
367
Sass/CSS source files
368
- :type include_paths: :class:`collections.Sequence`
368
+ :type include_paths: :class:`collections.abc. Sequence`
369
369
:param precision: optional precision for numbers. :const:`5` by default.
370
370
:type precision: :class:`int`
371
371
:param custom_functions: optional mapping of custom functions.
372
372
see also below `custom functions
373
373
<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`
377
377
:raises sass.CompileError: when it fails for any reason
378
378
(for example the given Sass has broken syntax)
379
379
380
380
.. _custom-functions:
381
381
382
382
The ``custom_functions`` parameter can take three types of forms:
383
383
384
- :class:`~collections.Set `/:class:`~collections.Sequence` of \
384
+ :class:`~set `/:class:`~collections.abc .Sequence` of \
385
385
:class:`SassFunction`\ s
386
386
It is the most general form. Although pretty verbose, it can take
387
387
any kind of callables like type objects, unnamed functions,
@@ -397,7 +397,7 @@ def compile(**kwargs):
397
397
}
398
398
)
399
399
400
- :class:`~collections.Mapping` of names to functions
400
+ :class:`~collections.abc. Mapping` of names to functions
401
401
Less general, but easier-to-use form. Although it's not it can take
402
402
any kind of callables, it can take any kind of *functions* defined
403
403
using :keyword:`def`/:keyword:`lambda` syntax.
@@ -414,7 +414,7 @@ def compile(**kwargs):
414
414
}
415
415
)
416
416
417
- :class:`~collections.Set `/:class:`~collections.Sequence` of \
417
+ :class:`~set `/:class:`~collections.abc .Sequence` of \
418
418
named functions
419
419
Not general, but the easiest-to-use form for *named* functions.
420
420
It can take only named functions, defined using :keyword:`def`.
@@ -647,7 +647,7 @@ def and_join(strings):
647
647
'Korea, Japan, China, and Taiwan'
648
648
649
649
:param strings: a list of words to join
650
- :type string: :class:`collections.Sequence`
650
+ :type string: :class:`collections.abc. Sequence`
651
651
:returns: a joined string
652
652
:rtype: :class:`str`, :class:`basestring`
653
653
0 commit comments