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

[flake8-pytest-style] Rewrite references to .exception (PT027) #15680

Merged
merged 6 commits into from
Jan 23, 2025

Conversation

InSyncWithFoo
Copy link
Contributor

Summary

Resolves #8650.

Test Plan

cargo nextest run and cargo insta test.

Copy link
Contributor

github-actions bot commented Jan 23, 2025

ruff-ecosystem results

Linter (stable)

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

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

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

+ tests/integration_tests/charts/schema_tests.py:59:9: ANN201 Missing return type annotation for public function `test_query_context_series_limit`
- tests/integration_tests/charts/schema_tests.py:59:9: ANN201 Missing return type annotation for public function `test_query_context_series_limit`
+ tests/integration_tests/viz_tests.py:739:9: ANN201 Missing return type annotation for public function `test_filter_nulls`
- tests/integration_tests/viz_tests.py:739:9: ANN201 Missing return type annotation for public function `test_filter_nulls`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
ANN201 4 2 2 0 0

Linter (preview)

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

apache/superset (+3 -3 violations, +0 -0 fixes)

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

- tests/integration_tests/charts/schema_tests.py:59:9: PLR6301 Method `test_query_context_series_limit` could be a function, class method, or static method
+ tests/integration_tests/charts/schema_tests.py:59:9: PLR6301 Method `test_query_context_series_limit` could be a function, class method, or static method
- tests/integration_tests/model_tests.py:202:9: PLR6301 Method `test_adjust_engine_params_mysql` could be a function, class method, or static method
+ tests/integration_tests/model_tests.py:202:9: PLR6301 Method `test_adjust_engine_params_mysql` could be a function, class method, or static method
+ tests/integration_tests/viz_tests.py:899:9: ANN201 Missing return type annotation for public function `test_apply_rolling_without_data`
- tests/integration_tests/viz_tests.py:899:9: ANN201 Missing return type annotation for public function `test_apply_rolling_without_data`

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
PLR6301 4 2 2 0 0
ANN201 2 1 1 0 0

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. A few nit comments

@MichaReiser MichaReiser added the fixes Related to suggested fixes for violations label Jan 23, 2025
@MichaReiser MichaReiser merged commit 569060f into astral-sh:main Jan 23, 2025
21 checks passed
@InSyncWithFoo InSyncWithFoo deleted the PT027 branch January 23, 2025 16:53
dcreager added a commit that referenced this pull request Jan 24, 2025
* main:
  Add `check` command (#15692)
  [red-knot] Use itertools to clean up `SymbolState::merge` (#15702)
  [red-knot] Add `--ignore`, `--warn`, and `--error` CLI arguments (#15689)
  Use `uv init --lib` in tutorial (#15718)
  [red-knot] Use `Unknown | T_inferred` for undeclared public symbols (#15674)
  [`ruff`] Parenthesize fix when argument spans multiple lines for `unnecessary-round` (`RUF057`) (#15703)
  [red-knot] Rename `TestDbBuilder::typeshed` to `.custom_typeshed` (#15712)
  Honor banned top level imports by TID253 in PLC0415.  (#15628)
  Apply `AIR302`-context check only in `@task` function (#15711)
  [`airflow`] Update `AIR302` to check for deprecated context keys (#15144)
  Remove test rules from JSON schema (#15627)
  Add two missing commits to changelog (#15701)
  Fix grep for version number in docker build (#15699)
  Bump version to 0.9.3 (#15698)
  Preserve raw string prefix and escapes (#15694)
  [`flake8-pytest-style`] Rewrite references to `.exception` (`PT027`) (#15680)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixes Related to suggested fixes for violations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite exception references in PT027 fix
2 participants