Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregating All Rules Implemented for the Thesis (Do not merge!) #22

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Lokejoke
Copy link
Owner

@Lokejoke Lokejoke commented Dec 3, 2024

Rules Implemented for the Ruff Project

Origin Tool Origin Code Name Plugin Code Status
pylint C1802 len-test pylint PLC1802 merged
- - invalid-assert-message-literal-argument ruff RUF040 merged
wps WPS116 consecutive-underscores-in-name wps-light WPS116 rejected
wps WPS117 reserved-argument-as-variable wps-light WPS117 rejected
wps WPS121 used-dummy-variable ruff RUF052 merged
wps WPS303 underscores-in-number wps-light WPS303 rejected
wps WPS362 assignment-to-subscript-slice wps-light WPS362 rejected
wps WPS435 list-multiplication wps-light WPS435 rejected
wps WPS463 getter-without-return-value wps-light WPS463 rejected
wps WPS525 in-compare-with-single-item-container ruff RUF051 duplicate
wps WPS604 wrong-class-body-content ruff RUF050 PR and closed

Each has independent PR, so the ruff ecosystem shows rule-specific results.


This table shows all the rules implemented to contribute to the Ruff project.
Here are successful PRs that made it through automated checks and benchmarks and, after deep discussions with the Astral team, merged. All rules are in the preview state.

  • len test PR
    • fixed flag logic PR
  • invalid assert message literal argument PR
    • issue filed to Apache Airflow Core issue and fix merged PR
  • dummy variable accessed PR

Lokejoke and others added 4 commits December 3, 2024 14:12
* Created plugin for wps-light

* [wps-light] Add consecutive-undescores-in-name (WPS116)

* Accepted test snap

* [wps-light] Implemented use-of-unused-marked-variables (WPS121)

* Accepted test snap (#1)

Co-authored-by: xbrtnik1 <[email protected]>

* [wps-light] Implemented getter-without-return-value (WPS463)

* Corrected typo

* This branch should be only a placeholder for future rules without merging

* [wps-light] Implement list-multiplication (WPS435)

* Format rule

* Fixed fmt of docs example

* Add rule

* Md doc formatted

* Md doc formatted

* Md doc formatted

* Seperate this rule from others

* Seperate this rule from others

* Seperate rule

* Added rule underscores_in_number (WPS303)

* Add always fixable violation attribute

* fix doc fault

* Fixed rule doc

* Implemented assignment-to-subscript-slice (362)

* Fixed rule docs

* fix comments

* last doc changes

* Implemented reserved-argument-as-variable (WPS117)

* implemented wps rule wrong class body content

* Reformated

* Implemented wps rule in-compare-with-single-item-container

* Implemented wps rule in-compare-with-single-item-container

* Implemented wps rule unused-variable-

* Allowed IfStmt in stubs, allowed pass and ellipsis

* return None is also valid getter output

* updated snap

* Query reworked; changed fix_title

* violation changes

* Updated snap

* removed old snap

* Restructured filters, filtering out non-dummy variables

* Edited error msgs and filtering

* Fmt

* Removed unused code

* Catching all dummy vars

* Renamed rule to dummy-variable-accessed

* Fix is now available

* Update crates/ruff_linter/src/rules/ruff/rules/dummy_variable_accessed.rs

Co-authored-by: Alex Waygood <[email protected]>

* Diagnostic is applied only on the binding definition, changed visibility of is_keyword

* Last touches, no changes to snap though

* fmt

* Applied proposed changes

* idc

* added all wps-plugin rules

* fmt

* added

---------

Co-authored-by: xbrtnik1 <[email protected]>
Co-authored-by: xbrtnik1 <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Copy link

github-actions bot commented Dec 3, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+3439 -3308 violations, +0 -0 fixes in 27 projects; 5 project errors; 23 projects unchanged)

RasaHQ/rasa (+8 -0 violations, +0 -0 fixes)

+ rasa/cli/utils.py:74:27: RUF021 [*] Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
+ rasa/core/processor.py:587:17: RUF021 [*] Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
+ rasa/shared/core/training_data/structures.py:619:17: RUF021 [*] Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
+ rasa/shared/core/training_data/structures.py:621:20: RUF021 [*] Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
+ rasa/utils/train_utils.py:534:9: RUF021 [*] Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
+ rasa/utils/train_utils.py:536:12: RUF021 [*] Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
... 1 additional changes omitted for rule RUF021
+ stubs/aio_pika/__init__.pyi:23:11: RUF022 [*] `__all__` is not sorted
+ stubs/sanic.pyi:11:11: RUF022 [*] `__all__` is not sorted

Snowflake-Labs/snowcli (+1 -0 violations, +0 -0 fixes)

+ performance_history_analysis.py:24:18: A004 Import `print` is shadowing a Python builtin

PlasmaPy/PlasmaPy (+4 -0 violations, +0 -0 fixes)

+ src/plasmapy/particles/_special_particles.py:260:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/plasmapy/particles/decorators.py:677:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/plasmapy/particles/ionization_state_collection.py:479:13: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/plasmapy/plasma/grids.py:769:9: PLC0206 Extracting value from dictionary without calling `.items()`

apache/superset (+436 -440 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ RELEASING/changelog.py:227:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ scripts/benchmark_migration.py:128:21: PERF401 Use `list.extend` to create a transformed list
- scripts/benchmark_migration.py:128:21: PERF401 Use a list comprehension to create a transformed list
+ superset/advanced_data_type/api.py:28:47: TC001 Move application import `superset.advanced_data_type.types.AdvancedDataTypeResponse` into a type-checking block
- superset/advanced_data_type/api.py:28:47: TCH001 Move application import `superset.advanced_data_type.types.AdvancedDataTypeResponse` into a type-checking block
+ superset/advanced_data_type/plugins/internet_address.py:68:17: C417 Unnecessary `map()` usage (rewrite using a generator expression)
- superset/advanced_data_type/plugins/internet_address.py:68:17: C417 Unnecessary `map` usage (rewrite using a generator expression)
+ superset/advanced_data_type/plugins/internet_port.py:97:17: C417 Unnecessary `map()` usage (rewrite using a generator expression)
- superset/advanced_data_type/plugins/internet_port.py:97:17: C417 Unnecessary `map` usage (rewrite using a generator expression)
+ superset/async_events/async_query_manager.py:26:41: TC002 Move third-party import `flask_caching.backends.base.BaseCache` into a type-checking block
... 866 additional changes omitted for project

aws/aws-sam-cli (+1 -0 violations, +0 -0 fixes)

+ tests/integration/pipeline/test_bootstrap_command.py:229:9: PLC0206 Extracting value from dictionary without calling `.items()`

bokeh/bokeh (+1260 -1260 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ docs/bokeh/source/docs/first_steps/examples/first_steps_8_filter.py:6:32: C408 Unnecessary `dict()` call (rewrite as a literal)
- docs/bokeh/source/docs/first_steps/examples/first_steps_8_filter.py:6:32: C408 Unnecessary `dict` call (rewrite as a literal)
+ examples/advanced/extensions/parallel_plot/parallel_plot.py:29:36: C408 Unnecessary `dict()` call (rewrite as a literal)
- examples/advanced/extensions/parallel_plot/parallel_plot.py:29:36: C408 Unnecessary `dict` call (rewrite as a literal)
+ examples/advanced/extensions/parallel_plot/parallel_plot.py:72:31: C408 Unnecessary `dict()` call (rewrite as a literal)
- examples/advanced/extensions/parallel_plot/parallel_plot.py:72:31: C408 Unnecessary `dict` call (rewrite as a literal)
... 1857 additional changes omitted for rule C408
+ examples/basic/annotations/whisker.py:17:11: C413 [*] Unnecessary `list()` call around `sorted()`
- examples/basic/annotations/whisker.py:17:11: C413 [*] Unnecessary `list` call around `sorted()`
+ examples/models/widgets.py:84:37: UP031 Use format specifiers instead of percent format
+ examples/models/widgets.py:86:37: UP031 Use format specifiers instead of percent format
- examples/output/webgl/clustering.py:24:19: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/output/webgl/clustering.py:24:19: C416 Unnecessary list comprehension (rewrite using `list()`)
- examples/plotting/filtering.py:47:30: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/plotting/filtering.py:47:30: C416 Unnecessary list comprehension (rewrite using `list()`)
- examples/plotting/periodic_shells.py:46:29: PD011 Use `.to_numpy()` instead of `.values`
- examples/topics/pie/burtin.py:25:8: C406 Unnecessary `list` literal (rewrite as a `dict` literal)
+ examples/topics/pie/burtin.py:25:8: C406 Unnecessary list literal (rewrite as a dict literal)
- examples/topics/stats/density.py:29:12: PD011 Use `.to_numpy()` instead of `.values`
... 2502 additional changes omitted for project

freedomofpress/securedrop (+2 -0 violations, +0 -0 fixes)

+ molecule/testinfra/ossec/test_journalist_mail.py:14:45: RUF100 [*] Unused `noqa` directive (non-enabled: `PT004`)
+ securedrop/source_app/utils.py:86:17: UP031 Use format specifiers instead of percent format

ibis-project/ibis (+102 -0 violations, +0 -0 fixes)

+ ibis/backends/impala/tests/test_exprs.py:135:29: UP031 Use format specifiers instead of percent format
+ ibis/backends/impala/tests/test_exprs.py:421:29: UP031 Use format specifiers instead of percent format
+ ibis/backends/impala/tests/test_exprs.py:477:26: UP031 Use format specifiers instead of percent format
+ ibis/backends/impala/tests/test_exprs.py:514:29: UP031 Use format specifiers instead of percent format
+ ibis/backends/impala/udf.py:24:11: RUF022 [*] `__all__` is not sorted
+ ibis/backends/oracle/tests/test_client.py:3:36: RUF101 [*] `TCH003` is a redirect to `TC003`
+ ibis/backends/polars/rewrites.py:10:50: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/backends/sql/compilers/__init__.py:3:11: RUF022 [*] `__all__` is not sorted
+ ibis/backends/sql/compilers/base.py:178:17: RUF023 [*] `FuncGen.__slots__` is not sorted
+ ibis/backends/sql/compilers/base.py:83:21: RUF023 [*] `_Accessor.__slots__` is not sorted
... 92 additional changes omitted for project

langchain-ai/langchain (+1 -0 violations, +0 -0 fixes)

+ libs/core/langchain_core/runnables/config.py:114:38: B039 Do not use mutable data structures for `ContextVar` defaults

latchbio/latch (+30 -27 violations, +0 -0 fixes)

- src/latch/account.py:274:25: C409 Unnecessary `list` literal passed to `tuple()` (rewrite as a `tuple` literal)
+ src/latch/account.py:274:25: C409 Unnecessary list literal passed to `tuple()` (rewrite as a tuple literal)
- src/latch/account.py:312:25: C409 Unnecessary `list` literal passed to `tuple()` (rewrite as a `tuple` literal)
+ src/latch/account.py:312:25: C409 Unnecessary list literal passed to `tuple()` (rewrite as a tuple literal)
+ src/latch/functions/operators.py:183:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:37:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:48:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:59:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:68:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:73:5: PLC0206 Extracting value from dictionary without calling `.items()`
... 1 additional changes omitted for rule PLC0206
... 47 additional changes omitted for project

lnbits/lnbits (+219 -0 violations, +0 -0 fixes)

+ lnbits/app.py:257:6: UP006 Use `list` instead of `List` for type annotation
+ lnbits/app.py:9:1: UP035 `typing.List` is deprecated, use `list` instead
+ lnbits/commands.py:235:23: UP006 Use `list` instead of `List` for type annotation
+ lnbits/commands.py:465:6: UP006 Use `tuple` instead of `Tuple` for type annotation
+ lnbits/commands.py:494:6: UP006 Use `tuple` instead of `Tuple` for type annotation
+ lnbits/commands.py:6:1: UP035 `typing.List` is deprecated, use `list` instead
+ lnbits/commands.py:6:1: UP035 `typing.Tuple` is deprecated, use `tuple` instead
+ lnbits/core/crud.py:1018:6: UP006 Use `list` instead of `List` for type annotation
+ lnbits/core/crud.py:1235:43: UP006 Use `list` instead of `List` for type annotation
... 140 additional changes omitted for rule UP006
+ lnbits/core/crud.py:4:1: UP035 `typing.Dict` is deprecated, use `dict` instead
... 209 additional changes omitted for project

milvus-io/pymilvus (+24 -24 violations, +0 -0 fixes)

- examples/bulk_import/example_bulkwriter.py:101:33: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/bulk_import/example_bulkwriter.py:101:33: C416 Unnecessary list comprehension (rewrite using `list()`)
- examples/bulk_import/example_bulkwriter.py:314:30: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/bulk_import/example_bulkwriter.py:314:30: C416 Unnecessary list comprehension (rewrite using `list()`)
- examples/bulk_import/example_bulkwriter.py:341:39: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/bulk_import/example_bulkwriter.py:341:39: C416 Unnecessary list comprehension (rewrite using `list()`)
- examples/concurrency/multithreading_hello_milvus.py:42:23: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/concurrency/multithreading_hello_milvus.py:42:23: C416 Unnecessary list comprehension (rewrite using `list()`)
- examples/concurrency/multithreading_hello_milvus.py:53:13: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/concurrency/multithreading_hello_milvus.py:53:13: C416 Unnecessary list comprehension (rewrite using `list()`)
... 38 additional changes omitted for project

... Truncated remaining completed project reports due to GitHub comment length restrictions

DisnakeDev/disnake (error)

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/DisnakeDev:disnake/pyproject.toml
  Cause: TOML parse error at line 182, column 1
    |
182 | [tool.ruff.lint]
    | ^^^^^^^^^^^^^^^^
Unknown rule selector: `TC`

apache/airflow (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/apache:airflow/pyproject.toml
  Cause: TOML parse error at line 137, column 1
    |
137 | [tool.ruff.lint]
    | ^^^^^^^^^^^^^^^^
Unknown rule selector: `TC`

rotki/rotki (error)

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/rotki:rotki/pyproject.toml
  Cause: TOML parse error at line 168, column 1
    |
168 | [tool.ruff.lint]
    | ^^^^^^^^^^^^^^^^
Unknown rule selector: `TC`

indico/indico (error)

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/indico:indico/ruff.toml
  Cause: TOML parse error at line 10, column 1
   |
10 | [lint]
   | ^^^^^^
Unknown rule selector: `RUF035`

python-trio/trio (error)

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/python-trio:trio/pyproject.toml
  Cause: TOML parse error at line 98, column 1
   |
98 | [tool.ruff.lint]
   | ^^^^^^^^^^^^^^^^
Unknown rule selector: `TC`

Changes by rule (43 rules affected)

code total + violation - violation + fix - fix
C408 4404 2202 2202 0 0
TC001 353 353 0 0 0
TCH001 353 0 353 0 0
TC002 146 146 0 0 0
TCH002 146 0 146 0 0
UP006 145 145 0 0 0
ANN101 142 0 142 0 0
C416 90 45 45 0 0
TC003 88 88 0 0 0
TCH003 88 0 88 0 0
RUF022 71 71 0 0 0
UP035 71 71 0 0 0
PD011 67 0 67 0 0
E741 64 0 64 0 0
A004 58 58 0 0 0
PT004 51 0 51 0 0
PERF401 48 24 24 0 0
RUF101 42 42 0 0 0
RUF023 37 37 0 0 0
PLC0206 33 33 0 0 0
C400 28 14 14 0 0
C401 28 14 14 0 0
UP031 27 27 0 0 0
C409 26 13 13 0 0
C414 20 10 10 0 0
RUF100 20 17 3 0 0
PT005 19 0 19 0 0
FBT001 15 0 15 0 0
C417 12 6 6 0 0
RUF021 11 11 0 0 0
ANN102 8 0 8 0 0
TCH004 7 0 7 0 0
C413 4 2 2 0 0
C418 4 2 2 0 0
C406 4 2 2 0 0
PD009 4 0 4 0 0
B039 3 3 0 0 0
TC005 2 2 0 0 0
C403 2 1 1 0 0
TCH005 2 0 2 0 0
RUF018 2 0 2 0 0
A001 1 0 1 0 0
PLR0913 1 0 1 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+10625 -7867 violations, +16 -0 fixes in 23 projects; 5 project errors; 27 projects unchanged)

RasaHQ/rasa (+98 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ rasa/api.py:42:5: RUF052 [*] Local dummy variable `_endpoints` is accessed
+ rasa/core/actions/action.py:1218:9: RUF052 [*] Local dummy variable `_tracker` is accessed
+ rasa/core/actions/action.py:603:9: RUF052 [*] Local dummy variable `_events` is accessed
+ rasa/core/actions/forms.py:274:9: RUF052 [*] Local dummy variable `_tracker` is accessed
+ rasa/core/actions/forms.py:276:9: RUF052 [*] Local dummy variable `_action` is accessed
+ rasa/core/actions/two_stage_fallback.py:85:9: RUF052 [*] Local dummy variable `_user_clarified` is accessed
... 79 additional changes omitted for rule RUF052
+ rasa/shared/core/events.py:597:48: RUF036 `None` not at the end of the type annotation.
+ rasa/shared/core/events.py:624:31: RUF036 `None` not at the end of the type annotation.
+ rasa/utils/io.py:222:9: RUF039 [*] First argument to `re.compile()` is not raw string
+ rasa/utils/io.py:223:9: RUF039 First argument to `re.compile()` is not raw string
... 88 additional changes omitted for project

PlasmaPy/PlasmaPy (+0 -1 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

- src/plasmapy/particles/particle_collections.py:56:1: PLR0904 Too many public methods (21 > 20)

apache/superset (+1958 -1755 violations, +10 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

- RELEASING/changelog.py:104:9: DOC201 `return` is not documented in docstring
+ RELEASING/changelog.py:107:9: DOC201 `return` is not documented in docstring
- RELEASING/changelog.py:113:13: DOC201 `return` is not documented in docstring
+ RELEASING/changelog.py:276:26: RUF039 [*] First argument to `re.match()` is not raw string
+ RELEASING/changelog.py:52:9: DOC201 `return` is not documented in docstring
- RELEASING/changelog.py:54:13: DOC201 `return` is not documented in docstring
+ RELEASING/changelog.py:87:9: DOC201 `return` is not documented in docstring
... 1810 additional changes omitted for rule DOC201
+ scripts/benchmark_migration.py:128:21: PERF401 Use `list.extend` to create a transformed list
- scripts/benchmark_migration.py:128:21: PERF401 Use a list comprehension to create a transformed list
+ scripts/benchmark_migration.py:43:5: DOC501 Raised exception `Exception` missing from docstring
... 3713 additional changes omitted for project

aws/aws-sam-cli (+13 -1 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ samcli/local/docker/container.py:41:93: PLW1508 Invalid type for environment variable default; expected `str` or `None`
+ samcli/local/lambdafn/remote_files.py:33:93: PLW1508 Invalid type for environment variable default; expected `str` or `None`
+ tests/integration/buildcmd/test_build_terraform_applications.py:177:69: PLW1508 Invalid type for environment variable default; expected `str` or `None`
+ tests/integration/package/package_integ_base.py:51:77: PLW1508 Invalid type for environment variable default; expected `str` or `None`
+ tests/integration/package/package_integ_base.py:55:78: PLW1508 Invalid type for environment variable default; expected `str` or `None`
+ tests/integration/publish/publish_app_integ_base.py:22:75: PLW1508 Invalid type for environment variable default; expected `str` or `None`
... 7 additional changes omitted for rule PLW1508
- tests/integration/publish/publish_app_integ_base.py:60:16: PLR1714 Consider merging multiple comparisons: `f.suffix in (".yaml", ".json")`. Use a `set` if the elements are hashable.
+ tests/integration/publish/publish_app_integ_base.py:60:16: PLR1714 Consider merging multiple comparisons: `f.suffix in {".yaml", ".json"}`.
... 6 additional changes omitted for project

bokeh/bokeh (+1999 -1670 violations, +6 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

+ docs/bokeh/source/docs/first_steps/examples/first_steps_8_filter.py:6:32: C408 Unnecessary `dict()` call (rewrite as a literal)
- docs/bokeh/source/docs/first_steps/examples/first_steps_8_filter.py:6:32: C408 Unnecessary `dict` call (rewrite as a literal)
- examples/advanced/extensions/parallel_plot/parallel_plot.py:107:5: DOC201 `return` is not documented in docstring
+ examples/advanced/extensions/parallel_plot/parallel_plot.py:15:5: DOC201 `return` is not documented in docstring
+ examples/advanced/extensions/parallel_plot/parallel_plot.py:29:36: C408 Unnecessary `dict()` call (rewrite as a literal)
- examples/advanced/extensions/parallel_plot/parallel_plot.py:29:36: C408 Unnecessary `dict` call (rewrite as a literal)
+ examples/advanced/extensions/parallel_plot/parallel_plot.py:72:31: C408 Unnecessary `dict()` call (rewrite as a literal)
- examples/advanced/extensions/parallel_plot/parallel_plot.py:72:31: C408 Unnecessary `dict` call (rewrite as a literal)
... 1857 additional changes omitted for rule C408
+ examples/basic/annotations/whisker.py:17:11: C413 [*] Unnecessary `list()` call around `sorted()`
- examples/basic/annotations/whisker.py:17:11: C413 [*] Unnecessary `list` call around `sorted()`
... 3665 additional changes omitted for project

fronzbot/blinkpy (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ blinkapp/blinkapp.py:12:48: PLW1508 Invalid type for environment variable default; expected `str` or `None`

ibis-project/ibis (+118 -1 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ .github/workflows/algolia/upload-algolia-api.py:174:9: RUF052 [*] Local dummy variable `_creator` is accessed
+ ibis/backends/__init__.py:1396:17: RUF039 [*] First argument to `re.match()` is not raw string
+ ibis/backends/clickhouse/tests/conftest.py:22:67: PLW1508 Invalid type for environment variable default; expected `str` or `None`
+ ibis/backends/clickhouse/tests/test_client.py:221:62: PLW1508 Invalid type for environment variable default; expected `str` or `None`
+ ibis/backends/clickhouse/tests/test_client.py:376:60: PLW1508 Invalid type for environment variable default; expected `str` or `None`
+ ibis/backends/datafusion/__init__.py:699:31: RUF052 [*] Local dummy variable `_conn` is accessed
+ ibis/backends/datafusion/__init__.py:732:33: RUF052 [*] Local dummy variable `_conn` is accessed
+ ibis/backends/datafusion/__init__.py:739:33: RUF052 [*] Local dummy variable `_conn` is accessed
+ ibis/backends/datafusion/__init__.py:746:33: RUF052 [*] Local dummy variable `_conn` is accessed
+ ibis/backends/datafusion/__init__.py:753:40: RUF052 [*] Local dummy variable `_conn` is accessed
... 29 additional changes omitted for rule RUF052
... 109 additional changes omitted for project

latchbio/latch (+52 -29 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

- src/latch/account.py:274:25: C409 Unnecessary `list` literal passed to `tuple()` (rewrite as a `tuple` literal)
+ src/latch/account.py:274:25: C409 Unnecessary list literal passed to `tuple()` (rewrite as a tuple literal)
- src/latch/account.py:312:25: C409 Unnecessary `list` literal passed to `tuple()` (rewrite as a `tuple` literal)
+ src/latch/account.py:312:25: C409 Unnecessary list literal passed to `tuple()` (rewrite as a tuple literal)
- src/latch/ldata/_transfer/progress.py:48:29: C416 Unnecessary `set` comprehension (rewrite using `set()`)
+ src/latch/ldata/_transfer/progress.py:48:29: C416 Unnecessary set comprehension (rewrite using `set()`)
+ src/latch/ldata/_transfer/upload.py:10:38: TC003 Move standard library import `multiprocessing.managers.DictProxy` into a type-checking block
- src/latch/ldata/_transfer/upload.py:10:38: TCH003 Move standard library import `multiprocessing.managers.DictProxy` into a type-checking block
+ src/latch/ldata/_transfer/upload.py:10:49: TC003 Move standard library import `multiprocessing.managers.ListProxy` into a type-checking block
- src/latch/ldata/_transfer/upload.py:10:49: TCH003 Move standard library import `multiprocessing.managers.ListProxy` into a type-checking block
... 71 additional changes omitted for project

lnbits/lnbits (+224 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ lnbits/app.py:257:6: UP006 Use `list` instead of `List` for type annotation
+ lnbits/app.py:9:1: UP035 `typing.List` is deprecated, use `list` instead
+ lnbits/commands.py:235:23: UP006 Use `list` instead of `List` for type annotation
+ lnbits/commands.py:465:6: UP006 Use `tuple` instead of `Tuple` for type annotation
+ lnbits/commands.py:494:6: UP006 Use `tuple` instead of `Tuple` for type annotation
+ lnbits/commands.py:6:1: UP035 `typing.List` is deprecated, use `list` instead
+ lnbits/commands.py:6:1: UP035 `typing.Tuple` is deprecated, use `tuple` instead
+ lnbits/core/crud.py:1018:6: UP006 Use `list` instead of `List` for type annotation
+ lnbits/core/crud.py:1235:43: UP006 Use `list` instead of `List` for type annotation
... 140 additional changes omitted for rule UP006
+ lnbits/core/crud.py:4:1: UP035 `typing.Dict` is deprecated, use `dict` instead
... 214 additional changes omitted for project

milvus-io/pymilvus (+55 -24 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

- examples/bulk_import/example_bulkwriter.py:101:33: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/bulk_import/example_bulkwriter.py:101:33: C416 Unnecessary list comprehension (rewrite using `list()`)
- examples/bulk_import/example_bulkwriter.py:314:30: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/bulk_import/example_bulkwriter.py:314:30: C416 Unnecessary list comprehension (rewrite using `list()`)
- examples/bulk_import/example_bulkwriter.py:341:39: C416 Unnecessary `list` comprehension (rewrite using `list()`)
+ examples/bulk_import/example_bulkwriter.py:341:39: C416 Unnecessary list comprehension (rewrite using `list()`)
... 43 additional changes omitted for rule C416
+ pymilvus/bulk_writer/buffer.py:342:40: RUF051 Avoid comparing to a single item container with membership operator
+ pymilvus/bulk_writer/local_bulk_writer.py:111:9: RUF052 [*] Local dummy variable `_async` is accessed
+ pymilvus/client/abstract.py:237:9: RUF052 [*] Local dummy variable `_dict` is accessed
+ pymilvus/client/abstract.py:60:38: RUF051 Avoid comparing to a single item container with membership operator
... 69 additional changes omitted for project

... Truncated remaining completed project reports due to GitHub comment length restrictions

DisnakeDev/disnake (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/DisnakeDev:disnake/pyproject.toml
  Cause: TOML parse error at line 182, column 1
    |
182 | [tool.ruff.lint]
    | ^^^^^^^^^^^^^^^^
Unknown rule selector: `TC`

apache/airflow (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/apache:airflow/pyproject.toml
  Cause: TOML parse error at line 137, column 1
    |
137 | [tool.ruff.lint]
    | ^^^^^^^^^^^^^^^^
Unknown rule selector: `TC`

rotki/rotki (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/rotki:rotki/pyproject.toml
  Cause: TOML parse error at line 168, column 1
    |
168 | [tool.ruff.lint]
    | ^^^^^^^^^^^^^^^^
Unknown rule selector: `TC`

indico/indico (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/indico:indico/ruff.toml
  Cause: TOML parse error at line 10, column 1
   |
10 | [lint]
   | ^^^^^^
Unknown rule selector: `RUF035`

python-trio/trio (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/python-trio:trio/pyproject.toml
  Cause: TOML parse error at line 98, column 1
   |
98 | [tool.ruff.lint]
   | ^^^^^^^^^^^^^^^^
Unknown rule selector: `TC`

Changes by rule (118 rules affected)

code total + violation - violation + fix - fix
DOC201 5851 2922 2929 0 0
C408 4401 2199 2202 0 0
DOC501 2633 1316 1317 0 0
TC001 518 518 0 0 0
WPS116 446 446 0 0 0
RUF052 431 431 0 0 0
TCH001 363 0 363 0 0
LOG015 281 281 0 0 0
RUF036 268 268 0 0 0
WPS117 236 236 0 0 0
TC006 225 225 0 0 0
WPS362 206 206 0 0 0
DOC402 198 99 99 0 0
DOC202 186 93 93 0 0
RUF050 152 152 0 0 0
TCH002 146 0 146 0 0
TC002 145 145 0 0 0
UP006 145 145 0 0 0
RUF039 131 131 0 0 0
DOC502 130 65 65 0 0
TC003 116 116 0 0 0
TCH003 91 0 91 0 0
C416 90 45 45 0 0
UP035 72 71 1 0 0
RUF051 70 70 0 0 0
PD011 67 0 67 0 0
PYI066 58 29 29 0 0
WPS463 53 53 0 0 0
PERF401 48 24 24 0 0
COM812 47 0 47 0 0
RUF055 44 44 0 0 0
RUF101 42 42 0 0 0
PTH208 38 38 0 0 0
PLW1508 37 37 0 0 0
D102 32 0 32 0 0
RUF100 31 31 0 0 0
C400 28 14 14 0 0
C401 28 14 14 0 0
C409 26 13 13 0 0
D103 26 0 26 0 0
PLR1714 22 11 11 0 0
D212 21 1 20 0 0
C414 20 10 10 0 0
FBT001 17 0 17 0 0
PLC1802 14 14 0 0 0
PYI061 13 13 0 0 0
C417 12 6 6 0 0
PYI041 12 0 4 8 0
RUF012 11 0 11 0 0
F841 11 0 11 0 0
D200 10 1 9 0 0
D205 10 0 10 0 0
PLR0904 9 2 7 0 0
PGH003 9 0 9 0 0
RUF035 8 8 0 0 0
D101 8 0 8 0 0
PYI016 8 0 0 8 0
TCH004 7 0 7 0 0
TC008 6 6 0 0 0
D400 6 0 6 0 0
S101 6 0 6 0 0
RUF038 5 5 0 0 0
WPS435 5 5 0 0 0
D415 5 0 5 0 0
D401 5 0 5 0 0
PLR0913 5 0 5 0 0
C413 4 2 2 0 0
WPS303 4 4 0 0 0
C418 4 2 2 0 0
C406 4 2 2 0 0
CPY001 4 0 4 0 0
D202 4 0 4 0 0
PD009 4 0 4 0 0
RUF040 3 3 0 0 0
E501 3 2 1 0 0
D100 3 0 3 0 0
ANN002 3 0 3 0 0
ANN401 3 0 3 0 0
ARG003 3 0 3 0 0
C901 3 0 3 0 0
PLR0912 3 0 3 0 0
TC005 2 2 0 0 0
DOC403 2 1 1 0 0
C403 2 1 1 0 0
PT006 2 2 0 0 0
RUF022 2 2 0 0 0
TCH005 2 0 2 0 0
SIM910 2 0 2 0 0
PLR6201 2 0 2 0 0
TRY300 2 0 2 0 0
RUF018 2 0 2 0 0
PLR0917 2 0 2 0 0
D404 2 0 2 0 0
A001 2 0 2 0 0
PLR0914 2 0 2 0 0
PLR0915 2 0 2 0 0
SIM108 2 0 2 0 0
B007 2 0 2 0 0
PLC0415 2 0 2 0 0
TC004 1 1 0 0 0
UP007 1 0 1 0 0
TRY002 1 0 1 0 0
TRY003 1 0 1 0 0
EM101 1 0 1 0 0
ANN003 1 0 1 0 0
D105 1 0 1 0 0
RUF031 1 0 1 0 0
ERA001 1 0 1 0 0
PLW2901 1 0 1 0 0
FURB118 1 0 1 0 0
A002 1 0 1 0 0
RET505 1 0 1 0 0
D209 1 0 1 0 0
SIM103 1 0 1 0 0
PLC1901 1 0 1 0 0
FIX002 1 0 1 0 0
TD002 1 0 1 0 0
TD003 1 0 1 0 0

Formatter (stable)

ℹ️ ecosystem check detected format changes. (+115 -87 lines in 17 files in 5 projects; 5 project errors; 45 projects unchanged)

aws/aws-sam-cli (+34 -30 lines across 4 files)

tests/integration/pipeline/test_init_command.py~L98

 
         self.assertEqual(init_process_execute.process.returncode, 0)
 
-        with open(EXPECTED_JENKINS_FILE_PATH, "r") as expected, open(
-            os.path.join(".aws-sam", "pipeline", "generated-files", "Jenkinsfile"), "r"
-        ) as output:
+        with (
+            open(EXPECTED_JENKINS_FILE_PATH, "r") as expected,
+            open(os.path.join(".aws-sam", "pipeline", "generated-files", "Jenkinsfile"), "r") as output,
+        ):
             self.assertEqual(expected.read(), output.read())
 
         # also check the Jenkinsfile is not overridden

tests/unit/commands/samconfig/test_samconfig.py~L1066

         }
 
         # NOTE: Because we don't load the full Click BaseCommand here, this is mounted as top-level command
-        with samconfig_parameters(
-            ["start-lambda"], self.scratch_dir, **config_values
-        ) as config_path, tempfile.NamedTemporaryFile() as key_file, tempfile.NamedTemporaryFile() as cert_file:
+        with (
+            samconfig_parameters(["start-lambda"], self.scratch_dir, **config_values) as config_path,
+            tempfile.NamedTemporaryFile() as key_file,
+            tempfile.NamedTemporaryFile() as cert_file,
+        ):
             from samcli.commands.local.start_lambda.cli import cli
 
             LOG.debug(Path(config_path).read_text())

tests/unit/commands/samconfig/test_samconfig.py~L1171

         }
 
         # NOTE: Because we don't load the full Click BaseCommand here, this is mounted as top-level command
-        with samconfig_parameters(
-            ["start-lambda"], self.scratch_dir, **config_values
-        ) as config_path, tempfile.NamedTemporaryFile() as key_file, tempfile.NamedTemporaryFile() as cert_file:
+        with (
+            samconfig_parameters(["start-lambda"], self.scratch_dir, **config_values) as config_path,
+            tempfile.NamedTemporaryFile() as key_file,
+            tempfile.NamedTemporaryFile() as cert_file,
+        ):
             from samcli.commands.local.start_lambda.cli import cli
 
             LOG.debug(Path(config_path).read_text())

tests/unit/lib/build_module/test_build_strategy.py~L747

     def test_will_call_incremental_build_strategy(self, mocked_read, mocked_write, runtime):
         build_definition = FunctionBuildDefinition(runtime, "codeuri", None, "package_type", X86_64, {}, "handler")
         self.build_graph.put_function_build_definition(build_definition, Mock(full_path="function_full_path"))
-        with patch.object(
-            self.build_strategy, "_incremental_build_strategy"
-        ) as patched_incremental_build_strategy, patch.object(
-            self.build_strategy, "_cached_build_strategy"
-        ) as patched_cached_build_strategy:
+        with (
+            patch.object(self.build_strategy, "_incremental_build_strategy") as patched_incremental_build_strategy,
+            patch.object(self.build_strategy, "_cached_build_strategy") as patched_cached_build_strategy,
+        ):
             self.build_strategy.build()
 
             patched_incremental_build_strategy.build_single_function_definition.assert_called_with(build_definition)

tests/unit/lib/build_module/test_build_strategy.py~L767

     def test_will_call_cached_build_strategy(self, mocked_read, mocked_write, runtime):
         build_definition = FunctionBuildDefinition(runtime, "codeuri", None, "package_type", X86_64, {}, "handler")
         self.build_graph.put_function_build_definition(build_definition, Mock(full_path="function_full_path"))
-        with patch.object(
-            self.build_strategy, "_incremental_build_strategy"
-        ) as patched_incremental_build_strategy, patch.object(
-            self.build_strategy, "_cached_build_strategy"
-        ) as patched_cached_build_strategy:
+        with (
+            patch.object(self.build_strategy, "_incremental_build_strategy") as patched_incremental_build_strategy,
+            patch.object(self.build_strategy, "_cached_build_strategy") as patched_cached_build_strategy,
+        ):
             self.build_strategy.build()
 
             patched_cached_build_strategy.build_single_function_definition.assert_called_with(build_definition)

tests/unit/lib/build_module/test_build_strategy.py~L841

 
         build_definition = FunctionBuildDefinition(runtime, "codeuri", None, "package_type", X86_64, {}, "handler")
         self.build_graph.put_function_build_definition(build_definition, Mock(full_path="function_full_path"))
-        with patch.object(
-            build_strategy, "_incremental_build_strategy"
-        ) as patched_incremental_build_strategy, patch.object(
-            build_strategy, "_cached_build_strategy"
-        ) as patched_cached_build_strategy:
+        with (
+            patch.object(build_strategy, "_incremental_build_strategy") as patched_incremental_build_strategy,
+            patch.object(build_strategy, "_cached_build_strategy") as patched_cached_build_strategy,
+        ):
             build_strategy.build()
 
             if not use_container:

tests/unit/lib/remote_invoke/test_remote_invoke_executors.py~L79

         given_output_format = "text"
         test_execution_info = RemoteInvokeExecutionInfo(given_payload, None, given_parameters, given_output_format)
 
-        with patch.object(self.boto_action_executor, "_execute_action") as patched_execute_action, patch.object(
-            self.boto_action_executor, "_execute_action_file"
-        ) as patched_execute_action_file:
+        with (
+            patch.object(self.boto_action_executor, "_execute_action") as patched_execute_action,
+            patch.object(self.boto_action_executor, "_execute_action_file") as patched_execute_action_file,
+        ):
             given_result = Mock()
             patched_execute_action.return_value = given_result
 

tests/unit/lib/remote_invoke/test_remote_invoke_executors.py~L96

         given_output_format = "json"
         test_execution_info = RemoteInvokeExecutionInfo(None, given_payload_file, given_parameters, given_output_format)
 
-        with patch.object(self.boto_action_executor, "_execute_action") as patched_execute_action, patch.object(
-            self.boto_action_executor, "_execute_action_file"
-        ) as patched_execute_action_file:
+        with (
+            patch.object(self.boto_action_executor, "_execute_action") as patched_execute_action,
+            patch.object(self.boto_action_executor, "_execute_action_file") as patched_execute_action_file,
+        ):
             given_result = Mock()
             patched_execute_action_file.return_value = given_result
 

langchain-ai/langchain (+32 -23 lines across 5 files)

libs/community/tests/unit_tests/document_loaders/test_mongodb.py~L50

     mock_collection.find = mock_find
     mock_collection.count_documents = mock_count_documents
 
-    with patch(
-        "motor.motor_asyncio.AsyncIOMotorClient", return_value=MagicMock()
-    ), patch(
-        "langchain_community.document_loaders.mongodb.MongodbLoader.aload"...*[Comment body truncated]*

@Lokejoke Lokejoke changed the title Final fork (#21) Aggregating All Rules Implemented for the Thesis (Do not merge!) Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant