Skip to content

Commit 29998e1

Browse files
committed
Add documentation for "precision" parameter
1 parent f4d1494 commit 29998e1

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

sass.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ def compile(**kwargs):
7373
:type include_paths: :class:`collections.Sequence`, :class:`str`
7474
:param image_path: an optional path to find images
7575
:type image_path: :class:`str`
76+
:param precision: optional precision for numbers. :const:`5` by default.
77+
:type precision: :class:`int`
7678
:returns: the compiled CSS string
7779
:rtype: :class:`str`
7880
:raises sass.CompileError: when it fails for any reason
@@ -102,6 +104,8 @@ def compile(**kwargs):
102104
:type include_paths: :class:`collections.Sequence`, :class:`str`
103105
:param image_path: an optional path to find images
104106
:type image_path: :class:`str`
107+
:param precision: optional precision for numbers. :const:`5` by default.
108+
:type precision: :class:`int`
105109
:returns: the compiled CSS string, or a pair of the compiled CSS string
106110
and the source map string if ``source_comments='map'``
107111
:rtype: :class:`str`, :class:`tuple`
@@ -134,6 +138,8 @@ def compile(**kwargs):
134138
:type include_paths: :class:`collections.Sequence`, :class:`str`
135139
:param image_path: an optional path to find images
136140
:type image_path: :class:`str`
141+
:param precision: optional precision for numbers. :const:`5` by default.
142+
:type precision: :class:`int`
137143
:raises sass.CompileError: when it fails for any reason
138144
(for example the given SASS has broken syntax)
139145

sassc.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
4141
.. versionadded:: 0.4.0
4242
43+
.. option:: -p, --precision
44+
45+
Set the precision for numbers. Default is 5.
46+
47+
.. versionadded:: 0.6.3
48+
4349
.. option:: -v, --version
4450
4551
Prints the program version.
@@ -88,7 +94,7 @@ def main(argv=sys.argv, stdout=sys.stdout, stderr=sys.stderr):
8894
help='Watch file for changes. Requires the second '
8995
'argument (output css filename).')
9096
parser.add_option('-p', '--precision', action='store', type="int", default=5,
91-
help='Set number of decimal places. [default: %default]')
97+
help='Set the precision for numbers. [default: %default]')
9298
options, args = parser.parse_args(argv[1:])
9399
error = functools.partial(print,
94100
parser.get_prog_name() + ': error:',

0 commit comments

Comments
 (0)