@@ -3,7 +3,7 @@ line_length = 130
33target_version = [" py310" ]
44skip_magic_trailing_comma = true
55# Exclude protobuf files because they have long line lengths
6- # Ideally, we could configure black to allow longer line lengths
6+ # Ideally, we could configure Black to allow longer line lengths
77# for just these files, but doesn't seem possible yet.
88force-exclude = " .*_pb2.pyi"
99
@@ -13,8 +13,8 @@ combine_as_imports = true
1313line_length = 130
1414skip = [" .git" , " .github" , " .venv" ]
1515extra_standard_library = [
16- " typing_extensions" ,
1716 " _typeshed" ,
17+ " typing_extensions" ,
1818 # Extra modules not recognized by isort
1919 " _ast" ,
2020 " _bisect" ,
@@ -56,7 +56,7 @@ extra_standard_library = [
5656 " opcode" ,
5757 " pyexpat" ,
5858]
59- known_first_party = [" utils " , " parse_metadata " ]
59+ known_first_party = [" parse_metadata " , " utils " ]
6060
6161[tool .ruff ]
6262line-length = 130
@@ -68,33 +68,33 @@ exclude = [
6868 # Ignore generated protobuf stubs
6969 " *_pb2.pyi" ,
7070 # virtual environment, cache directories, etc.:
71- " env" ,
7271 " .env" ,
73- " .venv" ,
7472 " .git" ,
7573 " .mypy_cache" ,
7674 " .pytype" ,
75+ " .venv" ,
76+ " env" ,
7777]
7878
7979# Only enable rules that have safe autofixes;
8080# only enable rules that are relevant to stubs
8181select = [
82- " F401" , # Remove unused imports
83- " UP004 " , # Remove explicit `object` inheritance
84- " UP006 " , # PEP-585 autofixes
85- " UP007 " , # PEP-604 autofixes
86- " UP013 " , # Class-based syntax for TypedDicts
87- " UP014 " , # Class-based syntax for NamedTuples
88- " UP019 " , # Use str over typing.Text
89- " UP035 " , # import from typing , not typing_extensions, wherever possible
90- " UP039 " , # don't use parens after a class definition with no bases
91- " PYI009 " , # use `...`, not `pass`, in empty class bodies
92- " PYI010 " , # function bodies must be empty
93- " PYI012 " , # class bodies must not contain `pass`
94- " PYI013 " , # non-empty class bodies must not contain `...`
95- " PYI020 " , # quoted annotations are always unnecessary in stubs
96- " PYI025 " , # always alias `collections.abc.Set` as `AbstractSet` when importing it
97- " PYI032 " , # use `object`, not `Any`, as the second parameter to `__eq__`
82+ " F401" , # Remove unused imports
83+ " PYI009 " , # use `...`, not `pass`, in empty class bodies
84+ " PYI010 " , # function bodies must be empty
85+ " PYI012 " , # class bodies must not contain `pass`
86+ " PYI013 " , # non-empty class bodies must not contain `...`
87+ " PYI020 " , # quoted annotations are always unnecessary in stubs
88+ " PYI025 " , # always alias `collections.abc.Set` as `AbstractSet` when importing it
89+ " PYI032 " , # use `object` , not `Any`, as the second parameter to `__eq__`
90+ " UP004 " , # Remove explicit `object` inheritance
91+ " UP006 " , # PEP-585 autofixes
92+ " UP007 " , # PEP-604 autofixes
93+ " UP013 " , # Class-based syntax for TypedDicts
94+ " UP014 " , # Class-based syntax for NamedTuples
95+ " UP019 " , # Use str over typing.Text
96+ " UP035 " , # import from typing, not typing_extensions, wherever possible
97+ " UP039 " , # don't use parens after a class definition with no bases
9898]
9999
100100[tool .typeshed ]
0 commit comments