MCPcopy Create free account

hub / github.com/psf/black / functions

Functions1,067 in github.com/psf/black

↓ 1 callersMethodshow
Pretty-prints a given string of `code`. Convenience method for debugging.
tests/data/miscellaneous/debug_visitor.py:26
↓ 1 callersFunctionshutdown
Cancel all pending tasks on `loop`, wait for them, and close the loop.
src/black/concurrency.py:47
↓ 1 callersMethodsimplify_dfa
(self, dfa: List["DFAState"])
src/blib2to3/pgen2/pgen.py:267
↓ 1 callersFunctionskip_mark
(tests: FrozenSet[str])
tests/optional.py:115
↓ 1 callersFunctionstack_copy
Nodeless stack copy.
src/blib2to3/pgen2/parse.py:53
↓ 1 callersFunctionstringify_ast
Simple visitor generating strings to compare ASTs by content.
src/black/parsing.py:211
↓ 1 callersFunctionstrip_specifier_set
Strip minor versions for some specifiers in the specifier set. For background on version specifiers, see PEP 440: https://peps.python.org/pep
src/black/files.py:188
↓ 1 callersFunctionsub_twice
Replace `regex` with `replacement` twice on `original`. This is used by string normalization to perform replaces on overlapping matches.
src/black/strings.py:35
↓ 1 callersMethodswitch_to
(self, ilabel: int)
src/blib2to3/pgen2/parse.py:75
↓ 1 callersFunctiontest
()
src/blib2to3/pgen2/literals.py:58
↓ 1 callersFunctiontest_idempotent_any_syntatically_valid_python
( src_contents: str, mode: black.FileMode )
scripts/fuzz.py:41
↓ 1 callersFunctiontokenize
The tokenize() function accepts two parameters: one representing the input stream, and one providing an output mechanism for tokenize().
src/blib2to3/pgen2/tokenize.py:203
↓ 1 callersFunctiontokenize_loop
(readline, tokeneater)
src/blib2to3/pgen2/tokenize.py:223
↓ 1 callersMethodunifystate
(self, old: "DFAState", new: "DFAState")
src/blib2to3/pgen2/pgen.py:409
↓ 1 callersFunctionunmask_cell
Remove replacements from cell. For example "9b20" foo = bar becomes %%time foo = bar
src/black/handle_ipynb_magics.py:269
↓ 1 callersMethoduntokenize
(self, iterable: Iterable[TokenInfo])
src/blib2to3/pgen2/tokenize.py:250
↓ 1 callersFunctionvalidate_cell
Check that cell does not already contain TransformerManager transformations, or non-Python cell magics, which might cause tokenizer_rt to break be
src/black/__init__.py:942
↓ 1 callersFunctionvalidate_metadata
If notebook is marked as non-Python, don't format it. All notebook metadata fields are optional, see https://nbformat.readthedocs.io/en/lates
src/black/__init__.py:1005
↓ 1 callersMethodvisit_default
Default `visit_*()` implementation. Recurses to children of `node`.
src/black/nodes.py:171
↓ 1 callersFunctionwhitespace
Return whitespace prefix if needed for the given `leaf`. `complex_subscript` signals whether the given leaf is part of a subscription which h
src/black/nodes.py:178
FunctionA
()
tests/data/preview/long_strings__regression.py:333
MethodAnEquallyLonelyMethod
A multiline method docstring
tests/data/miscellaneous/docstring_no_string_normalization.py:5
FunctionB
()
tests/data/preview/long_strings__regression.py:334
MethodBMethod
(self)
tests/data/miscellaneous/force_pyi.py:9
FunctionC
()
tests/data/preview/long_strings__regression.py:335
FunctionD
()
tests/data/preview/long_strings__regression.py:336
FunctionE
()
tests/data/preview/long_strings__regression.py:337
FunctionF
()
tests/data/preview/long_strings__regression.py:338
FunctionG
()
tests/data/preview/long_strings__regression.py:339
FunctionISEOF
(x: int)
src/blib2to3/pgen2/token.py:93
FunctionISNONTERMINAL
(x: int)
src/blib2to3/pgen2/token.py:89
FunctionISTERMINAL
(x: int)
src/blib2to3/pgen2/token.py:85
Function__await__
()
tests/data/simple_cases/function.py:95
Method__bool__
Return True if the line has leaves or comments.
src/black/lines.py:474
Method__call__
StringTransformer instances have a call signature that mirrors that of the Transformer type. Raises: CannotTrans
src/black/trans.py:237
Method__call__
(self)
tests/data/simple_cases/function2.py:45
Method__contains__
Provide `Preview.FEATURE in Mode` syntax that mirrors the ``preview`` flag. The argument is not checked and features are not differe
src/black/mode.py:198
Method__deepcopy__
(self: _P, memo: Any)
src/blib2to3/pytree.py:109
Method__eq__
Compare two nodes for equality. This calls the method _eq().
src/blib2to3/pytree.py:84
Method__eq__
(self, other: Any)
src/blib2to3/pgen2/pgen.py:414
Method__init__
(self, cell_magic: Optional[CellMagic] = None)
src/black/handle_ipynb_magics.py:342
Method__init__
(self)
src/black/handle_ipynb_magics.py:384
Method__init__
(self, mode: Mode, features: Collection[Feature])
src/black/linegen.py:96
Method__init__
(self, line_length: int, normalize_strings: bool)
src/black/trans.py:199
Method__init__
(self)
src/black/trans.py:2249
Method__init__
(self, value: T)
src/black/rusty.py:12
Method__init__
(self, e: E)
src/black/rusty.py:20
Method__init__
Initializer. Takes a type constant (a symbol number >= 256), a sequence of child nodes, and an optional context keyword argu
src/blib2to3/pytree.py:247
Method__init__
Initializer. Takes a type constant (a token number < 256), a string value, and an optional context keyword argument.
src/blib2to3/pytree.py:400
Method__init__
Initializer. Takes optional type, content, and name. The type, if given must be a token type (< 256). If not given, this m
src/blib2to3/pytree.py:602
Method__init__
Initializer. Takes optional type, content, and name. The type, if given, must be a symbol type (>= 256). If the type is No
src/blib2to3/pytree.py:653
Method__init__
Initializer. Args: content: optional sequence of subsequences of patterns; if absent, matches one n
src/blib2to3/pytree.py:735
Method__init__
Initializer. The argument is either a pattern or None. If it is None, this only matches an empty sequence (effectively '$'
src/blib2to3/pytree.py:929
Method__init__
Initializer. Creates an attribute for each grammar symbol (nonterminal), whose value is the symbol's type (an int >= 256).
src/blib2to3/pygram.py:25
Method__init__
(self, generator: Any)
src/blib2to3/pgen2/driver.py:63
Method__init__
(self, grammar: Grammar, logger: Optional[Logger] = None)
src/blib2to3/pgen2/driver.py:120
Method__init__
(self, parser: "Parser", ilabels: List[int], context: Context)
src/blib2to3/pgen2/parse.py:61
Method__init__
( self, msg: Text, type: Optional[int], value: Optional[Text], context: Context )
src/blib2to3/pgen2/parse.py:133
Method__init__
(self)
src/blib2to3/pgen2/tokenize.py:238
Method__init__
(self)
src/blib2to3/pgen2/grammar.py:85
Method__init__
(self, filename: Path, stream: Optional[IO[Text]] = None)
src/blib2to3/pgen2/pgen.py:39
Method__init__
(self)
src/blib2to3/pgen2/pgen.py:381
Method__init__
(self, nfaset: Dict[NFAState, Any], final: NFAState)
src/blib2to3/pgen2/pgen.py:395
Method__init__
(self)
tests/test_black.py:114
Method__init__
(self)
tests/test_black.py:121
Method__init__
(self)
tests/data/simple_cases/comments.py:70
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:8
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:12
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:16
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:21
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:25
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:30
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:36
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:44
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:57
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:63
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:70
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:76
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:83
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:91
Method__init__
(self)
tests/data/simple_cases/class_methods_new_line.py:99
Method__iter__
(self)
src/blib2to3/pgen2/driver.py:89
Method__new__
Constructor that prevents BasePattern from being instantiated.
src/blib2to3/pytree.py:531
Method__next__
(self)
src/blib2to3/pgen2/driver.py:92
Method__post_init__
(self)
src/black/mode.py:188
Method__repr__
Return a canonical string representation.
src/blib2to3/pytree.py:277
Method__repr__
Return a canonical string representation.
src/blib2to3/pytree.py:429
Method__repr__
(self)
src/blib2to3/pytree.py:536
Method__str__
Render the line.
src/black/lines.py:458
Method__str__
Render a color report of the current state. Use `click.unstyle` to remove colors.
src/black/report.py:79
Method__str__
Return a pretty string representation. This reproduces the input source exactly.
src/blib2to3/pytree.py:286
Method__str__
Return a pretty string representation. This reproduces the input source exactly.
src/blib2to3/pytree.py:440
Method_eq
Compare two nodes for equality.
src/blib2to3/pytree.py:294
Method_eq
Compare two nodes for equality.
src/blib2to3/pytree.py:448
Method_init_host
(self, parsed)
tests/data/simple_cases/comments2.py:152
Function_legacy_listen_examples
()
tests/data/preview/long_strings__regression.py:400
Method_mocked_calls
()
tests/test_black.py:493
Method_new_wrapper
( output: io.StringIO, io_TextIOWrapper: Type[io.TextIOWrapper] )
tests/test_black.py:1381
Function_rhs
Wraps calls to `right_hand_split`. The calls increasingly `omit` right-hand trailers (bracket pairs with content), meaning th
src/black/linegen.py:538
Method_submatch
Match the pattern's content to the node's children. This assumes the node type matches and self.content is not None. Return
src/blib2to3/pytree.py:633
← previousnext →401–500 of 1,067, ranked by callers