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

Run dunder method rule on methods directly #9815

Merged
merged 1 commit into from Feb 4, 2024
Merged

Conversation

charliermarsh
Copy link
Member

This stood out in the flamegraph and I realized it requires us to traverse over all statements in the class (unnecessarily).

@charliermarsh charliermarsh marked this pull request as ready for review February 4, 2024 19:13
@charliermarsh charliermarsh added the internal An internal refactor or improvement label Feb 4, 2024
@charliermarsh charliermarsh merged commit ad01216 into main Feb 4, 2024
17 checks passed
@charliermarsh charliermarsh deleted the charlie/dunder branch February 4, 2024 19:24
@charliermarsh charliermarsh added performance Potential performance improvement and removed internal An internal refactor or improvement labels Feb 4, 2024
Copy link

github-actions bot commented Feb 4, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check encountered linter errors. (no lint changes; 1 project error)

sphinx-doc/sphinx (error)

ruff failed
  Cause: Selection of unstable rules without the `--preview` flag is not allowed. Enable preview or remove selection of:
	- FURB113
	- FURB131
	- FURB132

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+3 -3 violations, +0 -0 fixes in 2 projects; 41 projects unchanged)

apache/airflow (+2 -2 violations, +0 -0 fixes)

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

+ airflow/providers/databricks/operators/databricks_repos.py:105:9: ANN205 Missing return type annotation for staticmethod `__detect_repo_provider__`
- airflow/providers/databricks/operators/databricks_repos.py:105:9: ANN205 Missing return type annotation for staticmethod `__detect_repo_provider__`
+ airflow/providers/fab/auth_manager/models/__init__.py:81:9: ANN204 Missing return type annotation for special method `__neq__`
- airflow/providers/fab/auth_manager/models/__init__.py:81:9: ANN204 Missing return type annotation for special method `__neq__`

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

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

+ tests/unit/bokeh/core/test_serialization.py:806:17: ANN204 Missing return type annotation for special method `__array__`
- tests/unit/bokeh/core/test_serialization.py:806:17: ANN204 Missing return type annotation for special method `__array__`

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
ANN204 4 2 2 0 0
ANN205 2 1 1 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Potential performance improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant