]> git.madduck.net Git - etc/vim.git/blob - docs/contributing/reference/reference_functions.rst

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Migrate mypy config to pyproject.toml (#3936)
[etc/vim.git] / docs / contributing / reference / reference_functions.rst
1 *Black* functions
2 =================
3
4 *Contents are subject to change.*
5
6 .. currentmodule:: black
7
8 Assertions and checks
9 ---------------------
10
11 .. autofunction:: black.assert_equivalent
12
13 .. autofunction:: black.assert_stable
14
15 .. autofunction:: black.lines.can_be_split
16
17 .. autofunction:: black.lines.can_omit_invisible_parens
18
19 .. autofunction:: black.nodes.is_empty_tuple
20
21 .. autofunction:: black.nodes.is_import
22
23 .. autofunction:: black.lines.is_line_short_enough
24
25 .. autofunction:: black.nodes.is_multiline_string
26
27 .. autofunction:: black.nodes.is_one_tuple
28
29 .. autofunction:: black.brackets.is_split_after_delimiter
30
31 .. autofunction:: black.brackets.is_split_before_delimiter
32
33 .. autofunction:: black.nodes.is_stub_body
34
35 .. autofunction:: black.nodes.is_stub_suite
36
37 .. autofunction:: black.nodes.is_vararg
38
39 .. autofunction:: black.nodes.is_yield
40
41
42 Formatting
43 ----------
44
45 .. autofunction:: black.format_file_contents
46
47 .. autofunction:: black.format_file_in_place
48
49 .. autofunction:: black.format_stdin_to_stdout
50
51 .. autofunction:: black.format_str
52
53 .. autofunction:: black.reformat_one
54
55 .. autofunction:: black.concurrency.schedule_formatting
56
57 File operations
58 ---------------
59
60 .. autofunction:: black.dump_to_file
61
62 .. autofunction:: black.find_project_root
63
64 .. autofunction:: black.gen_python_files
65
66 .. autofunction:: black.read_pyproject_toml
67
68 Parsing
69 -------
70
71 .. autofunction:: black.decode_bytes
72
73 .. autofunction:: black.parsing.lib2to3_parse
74
75 .. autofunction:: black.parsing.lib2to3_unparse
76
77 Split functions
78 ---------------
79
80 .. autofunction:: black.linegen.bracket_split_build_line
81
82 .. autofunction:: black.linegen.bracket_split_succeeded_or_raise
83
84 .. autofunction:: black.linegen.delimiter_split
85
86 .. autofunction:: black.linegen.left_hand_split
87
88 .. autofunction:: black.linegen.right_hand_split
89
90 .. autofunction:: black.linegen.standalone_comment_split
91
92 .. autofunction:: black.linegen.transform_line
93
94 Caching
95 -------
96
97 .. autofunction:: black.cache.get_cache_dir
98
99 .. autofunction:: black.cache.get_cache_file
100
101 Utilities
102 ---------
103
104 .. py:function:: black.debug.DebugVisitor.show(code: str) -> None
105
106     Pretty-print the lib2to3 AST of a given string of `code`.
107
108 .. autofunction:: black.concurrency.cancel
109
110 .. autofunction:: black.nodes.child_towards
111
112 .. autofunction:: black.nodes.container_of
113
114 .. autofunction:: black.comments.convert_one_fmt_off_pair
115
116 .. autofunction:: black.diff
117
118 .. autofunction:: black.linegen.dont_increase_indentation
119
120 .. autofunction:: black.numerics.format_float_or_int_string
121
122 .. autofunction:: black.nodes.ensure_visible
123
124 .. autofunction:: black.lines.enumerate_reversed
125
126 .. autofunction:: black.comments.generate_comments
127
128 .. autofunction:: black.comments.generate_ignored_nodes
129
130 .. autofunction:: black.comments.is_fmt_on
131
132 .. autofunction:: black.comments.children_contains_fmt_on
133
134 .. autofunction:: black.nodes.first_leaf_of
135
136 .. autofunction:: black.linegen.generate_trailers_to_omit
137
138 .. autofunction:: black.get_future_imports
139
140 .. autofunction:: black.comments.list_comments
141
142 .. autofunction:: black.comments.make_comment
143
144 .. autofunction:: black.linegen.maybe_make_parens_invisible_in_atom
145
146 .. autofunction:: black.brackets.max_delimiter_priority_in_atom
147
148 .. autofunction:: black.normalize_fmt_off
149
150 .. autofunction:: black.numerics.normalize_numeric_literal
151
152 .. autofunction:: black.linegen.normalize_prefix
153
154 .. autofunction:: black.strings.normalize_string_prefix
155
156 .. autofunction:: black.strings.normalize_string_quotes
157
158 .. autofunction:: black.linegen.normalize_invisible_parens
159
160 .. autofunction:: black.nodes.preceding_leaf
161
162 .. autofunction:: black.re_compile_maybe_verbose
163
164 .. autofunction:: black.linegen.should_split_line
165
166 .. autofunction:: black.concurrency.shutdown
167
168 .. autofunction:: black.strings.sub_twice
169
170 .. autofunction:: black.nodes.whitespace