Don't fix in ecosystem check#15267
Merged
MichaReiser merged 1 commit intoastral-sh:mainfrom Jan 6, 2025
Merged
Conversation
Contributor
|
Member
|
Thanks. I patched the ecosystem check locally to get a sense of how the violations change between not specifying ℹ️ ecosystem check detected linter changes. (+20 -0 violations, +0 -0 fixes in 3 projects; 52 projects unchanged) pandas-dev/pandas (+0 -0 violations, +0 -0 fixes)
python/typeshed (+20 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select E,F,FA,I,PYI,RUF,UP,W
+ stdlib/argparse.pyi:395:63: PYI011 [*] Only simple default values allowed for typed arguments + stdlib/argparse.pyi:396:48: PYI011 [*] Only simple default values allowed for typed arguments + stdlib/argparse.pyi:399:57: PYI011 [*] Only simple default values allowed for typed arguments + stdlib/argparse.pyi:420:63: PYI011 [*] Only simple default values allowed for typed arguments + stdlib/argparse.pyi:421:48: PYI011 [*] Only simple default values allowed for typed arguments + stdlib/argparse.pyi:424:57: PYI011 [*] Only simple default values allowed for typed arguments + stdlib/builtins.pyi:119:9: PYI029 [*] Defining `__str__` in a stub is almost always redundant + stdlib/builtins.pyi:120:9: PYI029 [*] Defining `__repr__` in a stub is almost always redundant + stdlib/builtins.pyi:1687:1: PYI026 [*] Use `typing_extensions.TypeAlias` for type alias, e.g., `_SupportsSomeKindOfPow: TypeAlias = _SupportsPow2[Any, Any] | _SupportsPow3NoneOnly[Any, Any] | _SupportsPow3[Any, Any, Any]` + stdlib/builtins.pyi:229:1: PYI026 [*] Use `typing_extensions.TypeAlias` for type alias, e.g., `_LiteralInteger: TypeAlias = _PositiveInteger | _NegativeInteger | Literal[0]` + stdlib/distutils/version.pyi:26:9: PYI029 [*] Defining `__str__` in a stub is almost always redundant + stdlib/distutils/version.pyi:35:9: PYI029 [*] Defining `__str__` in a stub is almost always redundant + stubs/jsonschema/jsonschema/exceptions.pyi:32:34: PYI011 [*] Only simple default values allowed for typed arguments + stubs/jsonschema/jsonschema/exceptions.pyi:36:40: PYI011 [*] Only simple default values allowed for typed arguments + stubs/jsonschema/jsonschema/exceptions.pyi:37:33: PYI011 [*] Only simple default values allowed for typed arguments + stubs/jsonschema/jsonschema/exceptions.pyi:38:52: PYI011 [*] Only simple default values allowed for typed arguments + stubs/jsonschema/jsonschema/exceptions.pyi:41:45: PYI011 [*] Only simple default values allowed for typed arguments + stubs/olefile/olefile/olefile.pyi:187:37: PYI011 [*] Only simple default values allowed for typed arguments + stubs/olefile/olefile/olefile.pyi:193:82: PYI011 [*] Only simple default values allowed for typed arguments + stubs/tensorflow/tensorflow/autodiff.pyi:16:81: PYI011 [*] Only simple default values allowed for typed arguments python-trio/trio (+0 -0 violations, +0 -0 fixes)
Changes by rule (3 rules affected)
Index: python/ruff-ecosystem/ruff_ecosystem/check.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/python/ruff-ecosystem/ruff_ecosystem/check.py b/python/ruff-ecosystem/ruff_ecosystem/check.py
--- a/python/ruff-ecosystem/ruff_ecosystem/check.py (revision e5270e2ac2beada3ab141c66fa465dd6d115d8ae)
+++ b/python/ruff-ecosystem/ruff_ecosystem/check.py (date 1736155061054)
@@ -515,6 +515,9 @@
options=options,
),
)
+ import dataclasses
+ options = dataclasses.replace(options, no_fix=True)
+
comparison_task = tg.create_task(
ruff_check(
executable=ruff_comparison_executable.resolve(),
Index: python/ruff-ecosystem/ruff_ecosystem/projects.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/python/ruff-ecosystem/ruff_ecosystem/projects.py b/python/ruff-ecosystem/ruff_ecosystem/projects.py
--- a/python/ruff-ecosystem/ruff_ecosystem/projects.py (revision e5270e2ac2beada3ab141c66fa465dd6d115d8ae)
+++ b/python/ruff-ecosystem/ruff_ecosystem/projects.py (date 1736154397660)
@@ -198,6 +198,8 @@
# Generating fixes is slow and verbose
show_fixes: bool = False
+ no_fix: bool = False
+
# Limit the number of reported lines per rule
max_lines_per_rule: int | None = 50
@@ -222,6 +224,8 @@
args.extend(["--exclude", self.exclude])
if self.show_fixes:
args.extend(["--show-fixes"])
+ if self.no_fix:
+ args.extend(["--no-fix"])
return args
|
dcreager
added a commit
that referenced
this pull request
Jan 6, 2025
* main: (60 commits) [`ruff`] Dataclass enums (`RUF049`) (#15299) Better error message when `--config` is given a table key and a non-inline-table value (#15266) Update pre-commit dependencies (#15289) Don't fix in ecosystem check (#15267) Update Rust crate itertools to 0.14.0 (#15287) Remove accidental empty block at the bottom of `split-static-string (SIM905)` doc (#15290) Update Rust crate clearscreen to v4 (#15288) Update Rust crate insta to v1.42.0 (#15286) Update NPM Development dependencies (#15285) Update dependency uuid to v11.0.4 (#15284) Update dependency ruff to v0.8.6 (#15283) Update Rust crate syn to v2.0.95 (#15282) Update Rust crate matchit to v0.8.6 (#15281) Update Rust crate bstr to v1.11.3 (#15280) [red-knot] Future-proof `Type::is_disjoint_from()` (#15262) [red-knot] Improve `Type::is_disjoint_from()` for `KnownInstanceType`s (#15261) [red-knot] Minor simplifications and improvements to constraint narrowing logic (#15270) Allow assigning ellipsis literal as parameter default value (#14982) [red-knot] fix control flow for assignment expressions in elif tests (#15274) [`refurb`] Mark fix as unsafe when the right-hand side is a string (`FURB171`) (#15273) ...
dcreager
added a commit
that referenced
this pull request
Jan 6, 2025
* main: (29 commits) [`ruff`] Dataclass enums (`RUF049`) (#15299) Better error message when `--config` is given a table key and a non-inline-table value (#15266) Update pre-commit dependencies (#15289) Don't fix in ecosystem check (#15267) Update Rust crate itertools to 0.14.0 (#15287) Remove accidental empty block at the bottom of `split-static-string (SIM905)` doc (#15290) Update Rust crate clearscreen to v4 (#15288) Update Rust crate insta to v1.42.0 (#15286) Update NPM Development dependencies (#15285) Update dependency uuid to v11.0.4 (#15284) Update dependency ruff to v0.8.6 (#15283) Update Rust crate syn to v2.0.95 (#15282) Update Rust crate matchit to v0.8.6 (#15281) Update Rust crate bstr to v1.11.3 (#15280) [red-knot] Future-proof `Type::is_disjoint_from()` (#15262) [red-knot] Improve `Type::is_disjoint_from()` for `KnownInstanceType`s (#15261) [red-knot] Minor simplifications and improvements to constraint narrowing logic (#15270) Allow assigning ellipsis literal as parameter default value (#14982) [red-knot] fix control flow for assignment expressions in elif tests (#15274) [`refurb`] Mark fix as unsafe when the right-hand side is a string (`FURB171`) (#15273) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Close #15146
Available fixes won't be applied in ecosystem checks even when the checked repository has
fix = truein their settings. This way the check output better reflects the actual changes in a given branch.Test Plan
I've run the ecosystem checks locally and compared the outputs before and after the change. I used a build from
mainand a build from #15139, which is where the need to make this change was identified. The branch in question only adds a fix, so it is expected that the ecosystem checks only find new fixes. These are the results (unfold to see full):Before the change: +0 -133 violations, +390 -0 fixes in 19 projects; 36 projects unchanged
DisnakeDev/disnake (+0 -0 violations, +2 -0 fixes)
RasaHQ/rasa (+0 -0 violations, +6 -0 fixes)
apache/airflow (+0 -0 violations, +242 -0 fixes)
apache/superset (+0 -0 violations, +10 -0 fixes)
bokeh/bokeh (+0 -0 violations, +6 -0 fixes)
latchbio/latch (+0 -0 violations, +14 -0 fixes)
lnbits/lnbits (+0 -0 violations, +2 -0 fixes)
milvus-io/pymilvus (+0 -0 violations, +2 -0 fixes)
pandas-dev/pandas (+0 -41 violations, +0 -0 fixes)
pypa/cibuildwheel (+0 -0 violations, +2 -0 fixes)
python/typeshed (+0 -89 violations, +0 -0 fixes)
python-poetry/poetry (+0 -3 violations, +0 -0 fixes)
... Truncated remaining completed project reports due to GitHub comment length restrictions
Changes by rule (1 rules affected)
After the change: +0 -0 violations, +786 -0 fixes in 19 projects; 36 projects unchanged
ℹ️ ecosystem check **detected linter changes**. (+0 -0 violations, +786 -0 fixes in 19 projects; 36 projects unchanged)DisnakeDev/disnake (+0 -0 violations, +2 -0 fixes)
RasaHQ/rasa (+0 -0 violations, +6 -0 fixes)
apache/airflow (+0 -0 violations, +242 -0 fixes)
apache/superset (+0 -0 violations, +10 -0 fixes)
bokeh/bokeh (+0 -0 violations, +6 -0 fixes)
latchbio/latch (+0 -0 violations, +14 -0 fixes)
lnbits/lnbits (+0 -0 violations, +2 -0 fixes)
milvus-io/pymilvus (+0 -0 violations, +2 -0 fixes)
pandas-dev/pandas (+0 -0 violations, +114 -0 fixes)
pypa/cibuildwheel (+0 -0 violations, +2 -0 fixes)
python/typeshed (+0 -0 violations, +276 -0 fixes)
python-poetry/poetry (+0 -0 violations, +6 -0 fixes)
... Truncated remaining completed project reports due to GitHub comment length restrictions
Changes by rule (1 rules affected)