Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/psf/black
/ functions
Functions
1,067 in github.com/psf/black
⨍
Functions
1,067
◇
Types & classes
148
↳
Endpoints
29
Method
test_tab_comment_indentation
(self)
tests/test_black.py:457
Function
test_trailing_semicolon
(fast: bool)
tests/test_ipynb.py:43
Function
test_trailing_semicolon_indented
()
tests/test_ipynb.py:63
Function
test_trailing_semicolon_noop
()
tests/test_ipynb.py:69
Function
test_trailing_semicolon_with_comment
()
tests/test_ipynb.py:50
Function
test_trailing_semicolon_with_comment_on_next_line
()
tests/test_ipynb.py:57
Function
test_type_comment_syntax_error
Test that black is able to format python code with type comment syntax errors.
tests/test_format.py:201
Function
test_unable_to_replace_magics
(monkeypatch: MonkeyPatch)
tests/test_ipynb.py:518
Function
test_unparseable_notebook
()
tests/test_ipynb.py:402
Method
test_works_in_mono_process_only_environment
(self)
tests/test_black.py:1110
Method
test_write_cache_creates_directory_if_needed
(self)
tests/test_black.py:2095
Method
test_write_cache_read_cache
(self)
tests/test_black.py:2066
Method
test_write_cache_write_fail
(self)
tests/test_black.py:2119
Function
testlist_star_expr
()
tests/data/simple_cases/fmtonoff.py:67
Function
that
"hey yah"
tests/data/simple_cases/docstring.py:91
Function
that
"hey yah"
tests/data/miscellaneous/docstring_no_string_normalization.py:81
Function
this
r""" 'hey ho'
tests/data/simple_cases/docstring.py:85
Function
this
r""" 'hey ho'
tests/data/miscellaneous/docstring_no_string_normalization.py:75
Function
this_is_so_dumb
()
tests/data/py_38/pep_572_remove_parens.py:49
Method
this_will_be_formatted
( self, **kwargs )
tests/data/simple_cases/fmtonoff5.py:74
Method
this_wont_be_formatted
( self )
tests/data/simple_cases/fmtonoff5.py:71
Function
top_level_quote_inline
()
tests/data/simple_cases/comments9.py:99
Function
top_level_quote_inline_after_else
()
tests/data/simple_cases/comments9.py:106
Function
tracefunc
Show function calls `from black/__init__.py` as they happen. Register this with `sys.settrace()` in a test you're debugging.
tests/test_black.py:2471
Function
trailing_comma
()
tests/data/simple_cases/function.py:77
Method
tricky_asserts
(self)
tests/data/simple_cases/composition.py:98
Method
tricky_asserts
(self)
tests/data/simple_cases/composition_no_trailing_comma.py:98
Function
troz
Indentation with tabs is just as OK
tests/data/simple_cases/docstring.py:33
Function
under_indent
These lines are indented in a way that does not make sense.
tests/data/simple_cases/docstring.py:61
Function
under_indent
These lines are indented in a way that does not make sense.
tests/data/miscellaneous/docstring_no_string_normalization.py:51
Function
unittest_run_loop
(func, *args, **kwargs)
tests/test_blackd.py:29
Function
untokenize
Transform tokens back into Python source code. Each element returned by the iterable must be a token sequence with at least two elements, a t
src/blib2to3/pgen2/tokenize.py:387
Function
validate_regex
( ctx: click.Context, param: click.Parameter, value: Optional[str], )
src/black/__init__.py:189
Function
verify_fader
(test)
tests/data/simple_cases/fmtonoff2.py:25
Method
visit_Assign
Look for system assign magics. For example, black_version = !black --version env = %env var would have been
src/black/handle_ipynb_magics.py:387
Method
visit_DEDENT
Decrease indentation level, maybe yield a line.
src/black/linegen.py:181
Method
visit_ENDMARKER
End of file. Process outstanding comments and end with a newline.
src/black/linegen.py:356
Method
visit_Expr
Find cell magic, extract header and body.
src/black/handle_ipynb_magics.py:345
Method
visit_Expr
Look for magics in body of cell. For examples, !ls !!ls ?ls ??ls would (respectivel
src/black/handle_ipynb_magics.py:420
Method
visit_INDENT
Increase indentation level, maybe yield a line.
src/black/linegen.py:175
Method
visit_SEMI
Remove a semicolon and put the other statement on a separate line.
src/black/linegen.py:352
Method
visit_STANDALONE_COMMENT
(self, leaf: Leaf)
src/black/linegen.py:361
Method
visit_STRING
(self, leaf: Leaf)
src/black/linegen.py:383
Method
visit_async_stmt
Visit `async def`, `async for`, `async with`.
src/black/linegen.py:302
Method
visit_decorators
Visit decorators.
src/black/linegen.py:322
Method
visit_default
(self, node: LN)
src/black/debug.py:18
Method
visit_default
(self, node: LN)
tests/data/miscellaneous/debug_visitor.py:5
Method
visit_dictsetmaker
(self, node: Node)
src/black/linegen.py:218
Method
visit_factor
Force parentheses between a unary op and a binary power: -2 ** 8 -> -(2 ** 8)
src/black/linegen.py:366
Method
visit_funcdef
Visit function definition.
src/black/linegen.py:235
Method
visit_match_case
Visit either a match or case statement.
src/black/linegen.py:259
Method
visit_power
(self, node: Node)
src/black/linegen.py:328
Method
visit_simple_stmt
Visit a statement without nested statements.
src/black/linegen.py:276
Method
visit_stmt
Visit a statement. This implementation is shared for `if`, `while`, `for`, `try`, `except`, `def`, `with`, `class`, `assert`, and ass
src/black/linegen.py:195
Method
visit_suite
Visit a suite.
src/black/linegen.py:269
Method
visit_test
Visit an `x if y else z` test
src/black/linegen.py:159
Function
wat
()
tests/data/simple_cases/comments.py:82
Function
wat
()
tests/data/simple_cases/comments5.py:34
Function
weird_default_argument
(x=some_long_value_name_foo_bar_baz if SOME_CONSTANT else some_fallback_value_foo_bar_baz)
tests/data/conditional_expression.py:33
Function
where_is
(point)
tests/data/py_310/pattern_matching_simple.py:81
Method
who
(self)
tests/data/preview/long_strings__regression.py:304
Method
xxxx_xxx_xx_xxxxxxxxxx_xxxx_xxxxxxxxx
(xxxx)
tests/data/preview/long_strings__regression.py:174
Method
xxxxxxx_xxxxxx
(xxxx)
tests/data/preview/long_strings__regression.py:346
Function
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
()
tests/data/simple_cases/function_trailing_comma.py:19
Function
yield_expr
()
tests/data/simple_cases/fmtonoff.py:73
Function
zoo
()
tests/data/miscellaneous/force_pyi.py:4
Function
zort
Another multiline docstring
tests/data/simple_cases/docstring.py:40
← previous
1,001–1,067 of 1,067, ranked by callers