Skip to content

Commit 2cdda12

Browse files
authored
Move RUF022+RUF023 ignores to stubs only and remove TODO (#13322)
Move RUF022+RUF023 to stubs only and remove TODO
1 parent 801c5c9 commit 2cdda12

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/ts_utils/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
__all__ = [
2525
"NoSuchStubError",
26-
"StubMetadata",
2726
"PackageDependencies",
27+
"StubMetadata",
2828
"StubtestSettings",
2929
"get_recursive_requirements",
3030
"read_dependencies",

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ extend-safe-fixes = [
7777
"UP036", # Remove unnecessary `sys.version_info` blocks
7878
]
7979
ignore = [
80-
# TODO: Ruff 0.8.0 added sorting of __all__ and __slots_. Validate whether we want this in stubs
81-
"RUF022",
82-
"RUF023",
83-
8480
###
8581
# Rules that can conflict with the formatter (Black)
8682
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
@@ -106,6 +102,11 @@ ignore = [
106102

107103
[tool.ruff.lint.per-file-ignores]
108104
"*.pyi" = [
105+
# Ruff 0.8.0 added sorting of __all__ and __slots_.
106+
# There is no consensus on whether we want to apply this to stubs, so keeping the status quo.
107+
# See https://github.com/python/typeshed/pull/13108
108+
"RUF022",
109+
"RUF023",
109110
# Most flake8-bugbear rules don't apply for third-party stubs like typeshed.
110111
# B033 could be slightly useful but Ruff doesn't have per-file select
111112
"B", # flake8-bugbear

0 commit comments

Comments
 (0)