repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/remove_newline_after_code_block_open.py
tests/data/cases/remove_newline_after_code_block_open.py
import random def foo1(): print("The newline above me should be kept!") def foo2(): print("All the newlines above me should be kept!") def foo3(): print("No newline above me!") print("There is a newline above me, and that's OK!") def foo4(): # There is a comment here print("The n...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/pattern_matching_extras.py
tests/data/cases/pattern_matching_extras.py
# flags: --minimum-version=3.10 import match match something: case [a as b]: print(b) case [a as b, c, d, e as f]: print(f) case Point(a as b): print(b) case Point(int() as x, int() as y): print(x, y) match = 1 case: int = re.match(something) match re.match(case): ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/no_blank_line_before_docstring.py
tests/data/cases/no_blank_line_before_docstring.py
def line_before_docstring(): """Please move me up""" class LineBeforeDocstring: """Please move me up""" class EvenIfThereIsAMethodAfter: """I'm the docstring""" def method(self): pass class TwoLinesBeforeDocstring: """I want to be treated the same as if I were closer""" class Mu...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/comments5.py
tests/data/cases/comments5.py
while True: if something.changed: do.stuff() # trailing comment # Comment belongs to the `if` block. # This one belongs to the `while` block. # Should this one, too? I guess so. # This one is properly standalone now. for i in range(100): # first we do this if i % 33 == 0: ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtskip2.py
tests/data/cases/fmtskip2.py
# flags: --no-preview-line-length-1 # l2 loses the comment with line-length=1 in preview mode l1 = ["This list should be broken up", "into multiple lines", "because it is way too long"] l2 = ["But this list shouldn't", "even though it also has", "way too many characters in it"] # fmt: skip l3 = ["I have", "trailing co...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/pep_604.py
tests/data/cases/pep_604.py
def some_very_long_name_function() -> my_module.Asdf | my_module.AnotherType | my_module.YetAnotherType | None: pass def some_very_long_name_function() -> my_module.Asdf | my_module.AnotherType | my_module.YetAnotherType | my_module.EvenMoreType | None: pass # output def some_very_long_name_function() -> ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtskip11.py
tests/data/cases/fmtskip11.py
def foo(): pass # comment 1 # fmt: skip # comment 2 [ (1, 2), # # fmt: off # (3, # 4), # # fmt: on (5, 6), ] [ (1, 2), # # fmt: off # (3, # 4), # fmt: on (5, 6), ] [ (1, 2), # fmt: off # (3, # 4), # # fmt: on (5, 6), ] [ (...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/line_ranges_decorator_edge_case.py
tests/data/cases/line_ranges_decorator_edge_case.py
# flags: --line-ranges=6-7 class Foo: @overload def foo(): ... def fox(self): print()
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/nested_stub.py
tests/data/cases/nested_stub.py
# flags: --pyi import sys class Outer: class InnerStub: ... outer_attr_after_inner_stub: int class Inner: inner_attr: int outer_attr: int if sys.version_info > (3, 7): if sys.platform == "win32": assignment = 1 def function_definition(self): ... def f1(self) -> str: ......
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/pep_570.py
tests/data/cases/pep_570.py
def positional_only_arg(a, /): pass def all_markers(a, b, /, c, d, *, e, f): pass def all_markers_with_args_and_kwargs( a_long_one, b_long_one, /, c_long_one, d_long_one, *args, e_long_one, f_long_one, **kwargs, ): pass def all_markers_with_defaults(a, b=1, /, c=2, ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtonoff3.py
tests/data/cases/fmtonoff3.py
# fmt: off x = [ 1, 2, 3, 4, ] # fmt: on # fmt: off x = [ 1, 2, 3, 4, ] # fmt: on x = [ 1, 2, 3, 4 ] # output # fmt: off x = [ 1, 2, 3, 4, ] # fmt: on # fmt: off x = [ 1, 2, 3, 4, ] # fmt: on x = [1, 2, 3, 4]
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/pep_572_py310.py
tests/data/cases/pep_572_py310.py
# flags: --minimum-version=3.10 # Unparenthesized walruses are now allowed in indices since Python 3.10. x[a := 0] x[a := 0, b := 1] x[5, b := 0] # Walruses are allowed inside generator expressions on function calls since 3.10. if any(match := pattern_error.match(s) for s in buffer): if match.group(2) == data_not_...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/tupleassign.py
tests/data/cases/tupleassign.py
# This is a standalone comment. sdfjklsdfsjldkflkjsf, sdfjsdfjlksdljkfsdlkf, sdfsdjfklsdfjlksdljkf, sdsfsdfjskdflsfsdf = 1, 2, 3 # This is as well. this_will_be_wrapped_in_parens, = struct.unpack(b"12345678901234567890") (a,) = call() # output # This is a standalone comment. ( sdfjklsdfsjldkflkjsf, sdfjsdf...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/one_element_subscript.py
tests/data/cases/one_element_subscript.py
# We should not treat the trailing comma # in a single-element subscript. a: tuple[int,] b = tuple[int,] # The magic comma still applies to multi-element subscripts. c: tuple[int, int,] d = tuple[int, int,] # Magic commas still work as expected for non-subscripts. small_list = [1,] list_of_types = [tuple[int,],] # o...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtpass_imports.py
tests/data/cases/fmtpass_imports.py
# Regression test for https://github.com/psf/black/issues/3438 import ast import collections # fmt: skip import dataclasses # fmt: off import os # fmt: on import pathlib import re # fmt: skip import secrets # fmt: off import sys # fmt: on import tempfile import zoneinfo
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/class_methods_new_line.py
tests/data/cases/class_methods_new_line.py
class ClassSimplest: pass class ClassWithSingleField: a = 1 class ClassWithJustTheDocstring: """Just a docstring.""" class ClassWithInit: def __init__(self): pass class ClassWithTheDocstringAndInit: """Just a docstring.""" def __init__(self): pass class ClassWithInitAndVars: ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/docstring_no_string_normalization.py
tests/data/cases/docstring_no_string_normalization.py
# flags: --skip-string-normalization class ALonelyClass: ''' A multiline class docstring. ''' def AnEquallyLonelyMethod(self): ''' A multiline method docstring''' pass def one_function(): '''This is a docstring with a single line of text.''' pass def shockingly_the_qu...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtskip5.py
tests/data/cases/fmtskip5.py
a, b, c = 3, 4, 5 if ( a == 3 and b != 9 # fmt: skip and c is not None ): print("I'm good!") else: print("I'm bad") # output a, b, c = 3, 4, 5 if ( a == 3 and b != 9 # fmt: skip and c is not None ): print("I'm good!") else: print("I'm bad")
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fstring.py
tests/data/cases/fstring.py
f"f-string without formatted values is just a string" f"{{NOT a formatted value}}" f"{{NOT 'a' \"formatted\" \"value\"}}" f"some f-string with {a} {few():.2f} {formatted.values!r}" f'some f-string with {a} {few(""):.2f} {formatted.values!r}' f"{f'''{'nested'} inner'''} outer" f"\"{f'{nested} inner'}\" outer" f"space be...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/jupytext_markdown_fmt.py
tests/data/cases/jupytext_markdown_fmt.py
# Test that Jupytext markdown comments are preserved before fmt:off/on blocks # %% [markdown] # fmt: off # fmt: on # Also test with other comments # Some comment # %% [markdown] # Another comment # fmt: off x = 1 # fmt: on # Test multiple markdown comments # %% [markdown] # First markdown # %% [code] # Code cell #...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/comments4.py
tests/data/cases/comments4.py
from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import ( MyLovelyCompanyTeamProjectComponent, # NOT DRY ) from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import ( MyLovelyCompanyTeamProjectComponent as component, # DRY ) class C: @pytest.ma...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/comments9.py
tests/data/cases/comments9.py
# Test for https://github.com/psf/black/issues/246. some = statement # This comment should be split from the statement above by two lines. def function(): pass some = statement # This multiline comments section # should be split from the statement # above by two lines. def function(): pass some = statement...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/context_managers_autodetect_38.py
tests/data/cases/context_managers_autodetect_38.py
# This file doesn't use any Python 3.9+ only grammars. # Make sure parens around a single context manager don't get autodetected as # Python 3.9+. with (a): pass with \ make_context_manager1() as cm1, \ make_context_manager2() as cm2, \ make_context_manager3() as cm3, \ make_context_manager4...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/preview_hug_parens_with_braces_and_square_brackets.py
tests/data/cases/preview_hug_parens_with_braces_and_square_brackets.py
# flags: --unstable def foo_brackets(request): return JsonResponse( { "var_1": foo, "var_2": bar, } ) def foo_square_brackets(request): return JsonResponse( [ "var_1", "var_2", ] ) func({"a": 37, "b": 42, "c": 927, "aaaaaa...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/preview_long_strings.py
tests/data/cases/preview_long_strings.py
# flags: --unstable x = "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three." x += "This is a really long string that can't possibly be expected to fit all together on one line. In...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
true
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/allow_empty_first_line.py
tests/data/cases/allow_empty_first_line.py
def foo(): """ Docstring """ # Here we go if x: # This is also now fine a = 123 else: # But not necessary a = 123 if y: while True: """ Long comment here """ a = 123 if z: for _ in...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/prefer_rhs_split.py
tests/data/cases/prefer_rhs_split.py
first_item, second_item = ( some_looooooooong_module.some_looooooooooooooong_function_name( first_argument, second_argument, third_argument ) ) some_dict["with_a_long_key"] = ( some_looooooooong_module.some_looooooooooooooong_function_name( first_argument, second_argument, third_argument ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/slices.py
tests/data/cases/slices.py
slice[a.b : c.d] slice[d :: d + 1] slice[d + 1 :: d] slice[d::d] slice[0] slice[-1] slice[:-1] slice[::-1] slice[:c, c - 1] slice[c, c + 1, d::] slice[ham[c::d] :: 1] slice[ham[cheese**2 : -1] : 1 : 1, ham[1:2]] slice[:-1:] slice[lambda: None : lambda: None] slice[lambda x, y, *args, really=2, **kwargs: None :, None::]...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/line_ranges_exceeding_end.py
tests/data/cases/line_ranges_exceeding_end.py
# flags: --line-ranges=6-1000 # NOTE: If you need to modify this file, pay special attention to the --line-ranges= # flag above as it's formatting specifically these lines. def foo1(parameter_1, parameter_2, parameter_3, parameter_4, parameter_5, parameter_6, parameter_7): pass def foo2(parameter_1, parameter_2, parame...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/pep_572_slices.py
tests/data/cases/pep_572_slices.py
x[(a:=0):] x[:(a:=0)] # output x[(a := 0) :] x[: (a := 0)]
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/remove_except_parens.py
tests/data/cases/remove_except_parens.py
# These brackets are redundant, therefore remove. try: a.something except (AttributeError) as err: raise err # This is tuple of exceptions. # Although this could be replaced with just the exception, # we do not remove brackets to preserve AST. try: a.something except (AttributeError,) as err: raise err...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/preview_comments7.py
tests/data/cases/preview_comments7.py
# flags: --unstable from .config import ( Any, Bool, ConfigType, ConfigTypeAttributes, Int, Path, # String, # resolve_to_config_type, # DEFAULT_TYPE_ATTRIBUTES, ) from .config import ( Any, Bool, ConfigType, ConfigTypeAttributes, Int, no_comma_here_yet ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/numeric_literals_skip_underscores.py
tests/data/cases/numeric_literals_skip_underscores.py
x = 123456789 x = 1_2_3_4_5_6_7 x = 1E+1 x = 0xb1acc x = 0.00_00_006 x = 12_34_567J x = .1_2 x = 1_2. # output x = 123456789 x = 1_2_3_4_5_6_7 x = 1e1 x = 0xB1ACC x = 0.00_00_006 x = 12_34_567j x = 0.1_2 x = 1_2.0
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/preview_long_dict_values.py
tests/data/cases/preview_long_dict_values.py
# flags: --preview x = { "xx_xxxxx_xxxxxxxxxx_xxxxxxxxx_xx": ( "xx:xxxxxxxxxxxxxxxxx_xxxxx_xxxxxxx_xxxxxxxxxxx{xx}xxx_xxxxx_xxxxxxxxx_xxxxxxxxxxxx_xxxx" ) } x = { "xx_xxxxx_xxxxxxxxxx_xxxxxxxxx_xx": ( "xx:xxxxxxxxxxxxxxxxx_xxxxx_xxxxxxx_xxxxxxxxxxx{xx}xxx_xxxxx_xxxxxxxxx_xxxxxxxxxxxx_xxxx" ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/type_comment_syntax_error.py
tests/data/cases/type_comment_syntax_error.py
def foo( # type: Foo x): pass # output def foo( # type: Foo x, ): pass
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/context_managers_39.py
tests/data/cases/context_managers_39.py
with \ make_context_manager1() as cm1, \ make_context_manager2() as cm2, \ make_context_manager3() as cm3, \ make_context_manager4() as cm4 \ : pass # Leading comment with \ make_context_manager1() as cm1, \ make_context_manager2(), \ make_context_manager3() as cm3, \ make_...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/line_ranges_unwrapping.py
tests/data/cases/line_ranges_unwrapping.py
# flags: --line-ranges=5-5 --line-ranges=9-9 --line-ranges=13-13 # NOTE: If you need to modify this file, pay special attention to the --line-ranges= # flag above as it's formatting specifically these lines. alist = [ 1, 2 ] adict = { "key" : "value" } func_call ( arg = value ) # output ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/power_op_spacing_long.py
tests/data/cases/power_op_spacing_long.py
a = 1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1 b = 1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1**1 c = 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 ** 1 d ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/expression.py
tests/data/cases/expression.py
... 'some_string' b'\\xa3' Name None True False 1 1.0 1j True or False True or False or None True and False True and False and None (Name1 and Name2) or Name3 Name1 and Name2 or Name3 Name1 or (Name2 and Name3) Name1 or Name2 and Name3 (Name1 and Name2) or (Name3 and Name4) Name1 and Name2 or Name3 and Name4 Name1 or (...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtskip10.py
tests/data/cases/fmtskip10.py
# flags: --preview def foo(): return "mock" # fmt: skip if True: print("yay") # fmt: skip for i in range(10): print(i) # fmt: skip if True: print("this"); print("that") # fmt: skip while True: print("loop"); break # fmt: skip for x in [1, 2]: print(x); print("done") # fmt: skip def f(x: int): return x # fmt: skip...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/stub.py
tests/data/cases/stub.py
# flags: --pyi X: int def f(): ... class D: ... class C: ... class B: this_lack_of_newline_should_be_kept: int def b(self) -> None: ... but_this_newline_should_also_be_kept: int class A: attr: int attr2: str def f(self) -> int: ... def g(self) -> str: ... def g(...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtonoff4.py
tests/data/cases/fmtonoff4.py
# fmt: off @test([ 1, 2, 3, 4, ]) # fmt: on def f(): pass @test([ 1, 2, 3, 4, ]) def f(): pass # output # fmt: off @test([ 1, 2, 3, 4, ]) # fmt: on def f(): pass @test( [ 1, 2, 3, 4, ] ) def f(): pass
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fstring_quotations.py
tests/data/cases/fstring_quotations.py
# Regression tests for long f-strings, including examples from issue #3623 a = ( 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' f'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"{"b"}"' ) a = ( f'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"{"b"}"'...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/pattern_matching_trailing_comma.py
tests/data/cases/pattern_matching_trailing_comma.py
# flags: --minimum-version=3.10 match maybe, multiple: case perhaps, 5: pass case perhaps, 6,: pass match more := (than, one), indeed,: case _, (5, 6): pass case [[5], (6)], [7],: pass case _: pass # output match maybe, multiple: case perhaps, 5: ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/single_line_format_skip_with_multiple_comments.py
tests/data/cases/single_line_format_skip_with_multiple_comments.py
foo = 123 # fmt: skip # noqa: E501 # pylint bar = ( 123 , ( 1 + 5 ) # pylint # fmt:skip ) baz = "a" + "b" # pylint; fmt: skip; noqa: E501 skip_will_not_work = "a" + "b" # pylint fmt:skip skip_will_not_work2 = "a" + "b" # some text; fmt:skip happens to be part of it...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/preview_long_strings__edge_case.py
tests/data/cases/preview_long_strings__edge_case.py
# flags: --unstable some_variable = "This string is long but not so long that it needs to be split just yet" some_variable = 'This string is long but not so long that it needs to be split just yet' some_variable = "This string is long, just long enough that it needs to be split, u get?" some_variable = 'This string is ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/remove_parens.py
tests/data/cases/remove_parens.py
x = (1) x = (1.2) data = ( "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ).encode() async def show_status(): while True: try: if report_host: data = ( f"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtskip6.py
tests/data/cases/fmtskip6.py
class A: def f(self): for line in range(10): if True: pass # fmt: skip # output class A: def f(self): for line in range(10): if True: pass # fmt: skip
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtskip3.py
tests/data/cases/fmtskip3.py
a = 3 # fmt: off b, c = 1, 2 d = 6 # fmt: skip e = 5 # fmt: on f = ["This is a very long line that should be formatted into a clearer line ", "by rearranging."] # output a = 3 # fmt: off b, c = 1, 2 d = 6 # fmt: skip e = 5 # fmt: on f = [ "This is a very long line that should be formatted into a...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/module_docstring_4.py
tests/data/cases/module_docstring_4.py
"""Single line module-level docstring should be followed by single newline.""" a = 1 # output """Single line module-level docstring should be followed by single newline.""" a = 1
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/skip_magic_trailing_comma_generic_wrap.py
tests/data/cases/skip_magic_trailing_comma_generic_wrap.py
# flags: --minimum-version=3.12 --skip-magic-trailing-comma def plain[T, B](a: T, b: T) -> T: return a def arg_magic[T, B](a: T, b: T,) -> T: return a def type_param_magic[T, B,](a: T, b: T) -> T: return a def both_magic[T, B,](a: T, b: T,) -> T: return a def plain_multiline[ T, B ]( a:...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/composition.py
tests/data/cases/composition.py
class C: def test(self) -> None: with patch("black.out", print): self.assertEqual( unstyle(str(report)), "1 file reformatted, 1 file failed to reformat." ) self.assertEqual( unstyle(str(report)), "1 file reformatted, 1 file ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/module_docstring_after_comment.py
tests/data/cases/module_docstring_after_comment.py
# flags: --preview #!/python # regression test for #4762 """ docstring """ from __future__ import annotations import os # output #!/python # regression test for #4762 """ docstring """ from __future__ import annotations import os
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/preview_wrap_comprehension_in.py
tests/data/cases/preview_wrap_comprehension_in.py
# flags: --preview --line-length=79 [a for graph_path_expression in refined_constraint.condition_as_predicate.variables] [ a for graph_path_expression in refined_constraint.condition_as_predicate.variables ] [ a for graph_path_expression in refined_constraint.condition_as_predicate.variables ] [ ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/backslash_before_indent.py
tests/data/cases/backslash_before_indent.py
# flags: --minimum-version=3.10 class Plotter: \ pass class AnotherCase: \ """Some \ Docstring """ # output class Plotter: pass class AnotherCase: """Some \ Docstring """
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/docstring_newline.py
tests/data/cases/docstring_newline.py
""" 87 characters ............................................................................ """
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/trailing_commas_in_leading_parts.py
tests/data/cases/trailing_commas_in_leading_parts.py
zero(one,).two(three,).four(five,) func1(arg1).func2(arg2,).func3(arg3).func4(arg4,).func5(arg5) # Inner one-element tuple shouldn't explode func1(arg1).func2(arg1, (one_tuple,)).func3(arg3) (a, b, c, d,) = func1(arg1) and func2(arg2) # Example from https://github.com/psf/black/issues/3229 def refresh_token(self, ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/parenthesized_context_managers.py
tests/data/cases/parenthesized_context_managers.py
# flags: --minimum-version=3.10 with (CtxManager() as example): ... with (CtxManager1(), CtxManager2()): ... with (CtxManager1() as example, CtxManager2()): ... with (CtxManager1(), CtxManager2() as example): ... with (CtxManager1() as example1, CtxManager2() as example2): ... with ( CtxMan...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtskip7.py
tests/data/cases/fmtskip7.py
a = "this is some code" b = 5 # fmt:skip c = 9 #fmt: skip d = "thisisasuperlongstringthisisasuperlongstringthisisasuperlongstringthisisasuperlongstring" # fmt:skip # output a = "this is some code" b = 5 # fmt:skip c = 9 #fmt: skip d = "thisisasuperlongstringthisisasuperlong...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/comments_in_blocks.py
tests/data/cases/comments_in_blocks.py
# Test cases from: # - https://github.com/psf/black/issues/1798 # - https://github.com/psf/black/issues/1499 # - https://github.com/psf/black/issues/1211 # - https://github.com/psf/black/issues/563 ( lambda # a comment : None ) ( lambda: # b comment None ) ( lambda # a comment : ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/module_docstring_followed_by_class.py
tests/data/cases/module_docstring_followed_by_class.py
"""Two blank lines between module docstring and a class.""" class MyClass: pass # output """Two blank lines between module docstring and a class.""" class MyClass: pass
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/cases/fmtonoff.py
tests/data/cases/fmtonoff.py
#!/usr/bin/env python3 import asyncio import sys from third_party import X, Y, Z from library import some_connection, \ some_decorator # fmt: off from third_party import (X, Y, Z) # fmt: on f'trigger 3.6 mode' # Comment 1 # Comment 2 # fmt: off def func_no_args(): a; b...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/force_pyi.py
tests/data/miscellaneous/force_pyi.py
# flags: --pyi from typing import Union @bird def zoo(): ... class A: ... @bar class B: def BMethod(self) -> None: ... @overload def BMethod(self, arg : List[str]) -> None: ... class C: ... @hmm class D: ... class E: ... @baz def foo() -> None: ... class F (A , C): ... def spam() -> None: ... @ove...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/pattern_matching_invalid.py
tests/data/miscellaneous/pattern_matching_invalid.py
# First match, no errors match something: case bla(): pass # Problem on line 10 match invalid_case: case valid_case: pass case a := b: pass case valid_case: pass # No problems either match something: case bla(): pass
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/missing_final_newline.py
tests/data/miscellaneous/missing_final_newline.py
# A comment-only file, with no final EOL character # This triggers https://bugs.python.org/issue2142 # This is the line without the EOL character
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/force_py36.py
tests/data/miscellaneous/force_py36.py
# The input source must not contain any Py36-specific syntax (e.g. argument type # annotations, trailing comma after *rest) or this test becomes invalid. def long_function_name(argument_one, argument_two, argument_three, argument_four, argument_five, argument_six, *rest): pass # output # The input source must not conta...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/decorators.py
tests/data/miscellaneous/decorators.py
# This file doesn't use the standard decomposition. # Decorator syntax test cases are separated by double # comments. # Those before the 'output' comment are valid under the old syntax. # Those after the 'ouput' comment require PEP614 relaxed syntax. # Do not remove the double # separator before the first test case, it...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/async_as_identifier.py
tests/data/miscellaneous/async_as_identifier.py
def async(): pass def await(): pass await = lambda: None async = lambda: None async() await() def sync_fn(): await = lambda: None async = lambda: None async() await() async def async_fn(): await async_fn() # output def async(): pass def await(): pass await = lambda: Non...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/blackd_diff.py
tests/data/miscellaneous/blackd_diff.py
def abc (): return ["hello", "world", "!"] print( "Incorrect formatting" )
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/string_quotes.py
tests/data/miscellaneous/string_quotes.py
'''''' '\'' '"' "'" "\"" "Hello" "Don't do that" 'Here is a "' 'What\'s the deal here?' "What's the deal \"here\"?" "And \"here\"?" """Strings with "" in them""" '''Strings with "" in them''' '''Here's a "''' '''Here's a " ''' '''Just a normal triple quote''' f"just a normal {f} string" f'''This is a triple-quoted {f}...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/debug_visitor.py
tests/data/miscellaneous/debug_visitor.py
@dataclass class DebugVisitor(Visitor[T]): tree_depth: int = 0 def visit_default(self, node: LN) -> Iterator[T]: indent = ' ' * (2 * self.tree_depth) if isinstance(node, Node): _type = type_repr(node.type) out(f'{indent}{_type}', fg='yellow') self.tree_depth ...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/invalid_header.py
tests/data/miscellaneous/invalid_header.py
This is not valid Python syntax y = "This is valid syntax"
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/miscellaneous/python2_detection.py
tests/data/miscellaneous/python2_detection.py
# This uses a similar construction to the decorators.py test data file FYI. print "hello, world!" ### exec "print('hello, world!')" ### def set_position((x, y), value): pass ### try: pass except Exception, err: pass ### raise RuntimeError, "I feel like crashing today :p" ### `wow_these_really_did...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/invalid_nested_gitignore_tests/a.py
tests/data/invalid_nested_gitignore_tests/a.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/invalid_nested_gitignore_tests/a/a.py
tests/data/invalid_nested_gitignore_tests/a/a.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/ignore_directory_gitignore_tests/z.py
tests/data/ignore_directory_gitignore_tests/z.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/ignore_directory_gitignore_tests/abc.py
tests/data/ignore_directory_gitignore_tests/abc.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/ignore_directory_gitignore_tests/large_ignored_dir_two/a.py
tests/data/ignore_directory_gitignore_tests/large_ignored_dir_two/a.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/ignore_directory_gitignore_tests/large_ignored_dir_two/inner3/d.py
tests/data/ignore_directory_gitignore_tests/large_ignored_dir_two/inner3/d.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/ignore_directory_gitignore_tests/large_ignored_dir_two/inner/b.py
tests/data/ignore_directory_gitignore_tests/large_ignored_dir_two/inner/b.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/ignore_directory_gitignore_tests/large_ignored_dir_two/inner2/c.py
tests/data/ignore_directory_gitignore_tests/large_ignored_dir_two/inner2/c.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/invalid_gitignore_tests/a.py
tests/data/invalid_gitignore_tests/a.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/line_ranges_formatted/basic.py
tests/data/line_ranges_formatted/basic.py
"""Module doc.""" from typing import ( Callable, Literal, ) # fmt: off class Unformatted: def should_also_work(self): pass # fmt: on a = [1, 2] # fmt: skip # This should cover as many syntaxes as possible. class Foo: """Class doc.""" def __init__(self) -> None: pass @add...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/line_ranges_formatted/pattern_matching.py
tests/data/line_ranges_formatted/pattern_matching.py
# flags: --minimum-version=3.10 def pattern_matching(): match status: case 1: return "1" case [single]: return "single" case [ action, obj, ]: return "act on obj" case Point(x=0): return "class pattern"...
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/include_exclude_tests/b/dont_exclude/a.py
tests/data/include_exclude_tests/b/dont_exclude/a.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/include_exclude_tests/b/.definitely_exclude/a.py
tests/data/include_exclude_tests/b/.definitely_exclude/a.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/include_exclude_tests/b/exclude/a.py
tests/data/include_exclude_tests/b/exclude/a.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/nested_gitignore_tests/x.py
tests/data/nested_gitignore_tests/x.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/nested_gitignore_tests/root/b.py
tests/data/nested_gitignore_tests/root/b.py
# should be included
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/nested_gitignore_tests/root/a.py
tests/data/nested_gitignore_tests/root/a.py
# should be excluded (root/.gitignore)
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/nested_gitignore_tests/root/c.py
tests/data/nested_gitignore_tests/root/c.py
# should be included
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/nested_gitignore_tests/root/child/b.py
tests/data/nested_gitignore_tests/root/child/b.py
# should be excluded (child/.gitignore)
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/nested_gitignore_tests/root/child/a.py
tests/data/nested_gitignore_tests/root/child/a.py
# should be excluded (root/.gitignore)
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/nested_gitignore_tests/root/child/c.py
tests/data/nested_gitignore_tests/root/child/c.py
# should be included
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/ignore_subfolders_gitignore_tests/a.py
tests/data/ignore_subfolders_gitignore_tests/a.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/ignore_subfolders_gitignore_tests/subdir/b.py
tests/data/ignore_subfolders_gitignore_tests/subdir/b.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/ignore_subfolders_gitignore_tests/subdir/subdir/c.py
tests/data/ignore_subfolders_gitignore_tests/subdir/subdir/c.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/gitignore_used_on_multiple_sources/dir2/b.py
tests/data/gitignore_used_on_multiple_sources/dir2/b.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/gitignore_used_on_multiple_sources/dir2/a.py
tests/data/gitignore_used_on_multiple_sources/dir2/a.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false
psf/black
https://github.com/psf/black/blob/c3cc5a95d4f72e6ccc27ebae23344fce8cc70786/tests/data/gitignore_used_on_multiple_sources/dir1/b.py
tests/data/gitignore_used_on_multiple_sources/dir1/b.py
python
MIT
c3cc5a95d4f72e6ccc27ebae23344fce8cc70786
2026-01-04T14:40:23.735327Z
false