document classes, functions, exceptions (#82)
This commit is contained in:
parent
10bb45c35e
commit
a9f50cd0b5
@ -112,6 +112,7 @@ def generate_sections_from_readme():
|
|||||||
extensions = [
|
extensions = [
|
||||||
'sphinx.ext.autodoc',
|
'sphinx.ext.autodoc',
|
||||||
'sphinx.ext.intersphinx',
|
'sphinx.ext.intersphinx',
|
||||||
|
'sphinx.ext.napoleon',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
@ -51,9 +51,9 @@ Contents
|
|||||||
editor_integration
|
editor_integration
|
||||||
contributing
|
contributing
|
||||||
change_log
|
change_log
|
||||||
|
reference/reference_summary
|
||||||
authors
|
authors
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
44
docs/reference/reference_classes.rst
Normal file
44
docs/reference/reference_classes.rst
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
*Black* classes
|
||||||
|
===============
|
||||||
|
|
||||||
|
*Contents are subject to change.*
|
||||||
|
|
||||||
|
.. currentmodule:: black
|
||||||
|
|
||||||
|
:class:`EmptyLineTracker`
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
.. autoclass:: black.EmptyLineTracker
|
||||||
|
:members:
|
||||||
|
|
||||||
|
:class:`FormatOn`
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. autoclass:: black.FormatOn
|
||||||
|
:members:
|
||||||
|
|
||||||
|
:class:`FormatOff`
|
||||||
|
------------------
|
||||||
|
|
||||||
|
.. autoclass:: black.FormatOff
|
||||||
|
:members:
|
||||||
|
|
||||||
|
:class:`LineGenerator`
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
.. autoclass:: black.LineGenerator
|
||||||
|
:members:
|
||||||
|
|
||||||
|
:class:`Report`
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. autoclass:: black.Report
|
||||||
|
:members:
|
||||||
|
|
||||||
|
:class:`Visitor`
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
.. autoclass:: black.Visitor
|
||||||
|
:members:
|
||||||
|
|
||||||
|
|
12
docs/reference/reference_exceptions.rst
Normal file
12
docs/reference/reference_exceptions.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
*Black* exceptions
|
||||||
|
==================
|
||||||
|
|
||||||
|
*Contents are subject to change.*
|
||||||
|
|
||||||
|
.. currentmodule:: black
|
||||||
|
|
||||||
|
.. autoexception:: black.CannotSplit
|
||||||
|
|
||||||
|
.. autoexception:: black.FormatError
|
||||||
|
|
||||||
|
.. autoexception:: black.NothingChanged
|
74
docs/reference/reference_functions.rst
Normal file
74
docs/reference/reference_functions.rst
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
*Black* functions
|
||||||
|
=================
|
||||||
|
|
||||||
|
*Contents are subject to change.*
|
||||||
|
|
||||||
|
.. currentmodule:: black
|
||||||
|
|
||||||
|
Assertions and checks
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
.. autofunction:: black.assert_equivalent
|
||||||
|
|
||||||
|
.. autofunction:: black.assert_stable
|
||||||
|
|
||||||
|
.. autofunction:: black.is_delimiter
|
||||||
|
|
||||||
|
.. autofunction:: black.is_import
|
||||||
|
|
||||||
|
.. autofunction:: black.is_python36
|
||||||
|
|
||||||
|
Formatting
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. autofunction:: black.format_file_contents
|
||||||
|
|
||||||
|
.. autofunction:: black.format_file_in_place
|
||||||
|
|
||||||
|
.. autofunction:: black.format_stdin_to_stdout
|
||||||
|
|
||||||
|
.. autofunction:: black.format_str
|
||||||
|
|
||||||
|
.. autofunction:: black.schedule_formatting
|
||||||
|
|
||||||
|
File operations
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. autofunction:: black.dump_to_file
|
||||||
|
|
||||||
|
.. autofunction:: black.gen_python_files_in_dir
|
||||||
|
|
||||||
|
Parsing
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. autofunction:: black.lib2to3_parse
|
||||||
|
|
||||||
|
.. autofunction:: black.lib2to3_unparse
|
||||||
|
|
||||||
|
Split functions
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. autofunction:: black.delimiter_split
|
||||||
|
|
||||||
|
.. autofunction:: black.left_hand_split
|
||||||
|
|
||||||
|
.. autofunction:: black.right_hand_split
|
||||||
|
|
||||||
|
.. autofunction:: black.split_line
|
||||||
|
|
||||||
|
.. autofunction:: black.split_succeeded_or_raise
|
||||||
|
|
||||||
|
Utilities
|
||||||
|
---------
|
||||||
|
|
||||||
|
.. autofunction:: black.diff
|
||||||
|
|
||||||
|
.. autofunction:: black.generate_comments
|
||||||
|
|
||||||
|
.. autofunction:: black.make_comment
|
||||||
|
|
||||||
|
.. autofunction:: black.normalize_prefix
|
||||||
|
|
||||||
|
.. autofunction:: black.preceding_leaf
|
||||||
|
|
||||||
|
.. autofunction:: black.whitespace
|
11
docs/reference/reference_summary.rst
Normal file
11
docs/reference/reference_summary.rst
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
Developer reference
|
||||||
|
===================
|
||||||
|
|
||||||
|
*Contents are subject to change.*
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
reference_classes
|
||||||
|
reference_functions
|
||||||
|
reference_exceptions
|
Loading…
Reference in New Issue
Block a user