Skip to content

Comments

Redirect TRY200 to B904#9755

Merged
zanieb merged 1 commit intorelease/0.2.0from
zb/try200
Feb 1, 2024
Merged

Redirect TRY200 to B904#9755
zanieb merged 1 commit intorelease/0.2.0from
zb/try200

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Feb 1, 2024

Follow-up to #9754 and #9689. Alternative to #9714.

Marks TRY200 as removed and redirects to B904 instead of marking as deprecated and suggesting B904 instead.

@zanieb zanieb added the rule Implementing or modifying a lint rule label Feb 1, 2024
@zanieb zanieb requested a review from charliermarsh February 1, 2024 15:48
@zanieb zanieb changed the title Redirect TRY200 to B904 Redirect TRY200 to B904 Feb 1, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2024

ruff-ecosystem results

Linter (stable)

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

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

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

- airflow/api/__init__.py:46:9: TRY200 Use `raise from` to specify exception cause
- airflow/api/client/local_client.py:80:13: TRY200 Use `raise from` to specify exception cause
- airflow/api/common/experimental/get_code.py:41:9: TRY200 Use `raise from` to specify exception cause
- airflow/api/common/experimental/pool.py:65:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/connection_endpoint.py:131:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/connection_endpoint.py:164:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/connection_endpoint.py:169:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/connection_endpoint.py:206:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_endpoint.py:138:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_endpoint.py:148:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_endpoint.py:171:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_endpoint.py:220:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_endpoint.py:222:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_endpoint.py:65:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_endpoint.py:87:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_run_endpoint.py:113:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_run_endpoint.py:262:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_run_endpoint.py:273:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_run_endpoint.py:325:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_run_endpoint.py:368:13: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_run_endpoint.py:394:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_run_endpoint.py:421:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_run_endpoint.py:468:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/dag_source_endpoint.py:62:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/extra_link_endpoint.py:58:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/log_endpoint.py:64:13: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/pool_endpoint.py:108:9: TRY200 Use `raise from` to specify exception cause
- airflow/api_connexion/endpoints/pool_endpoint.py:121:13: TRY200 Use `raise from` to specify exception cause
... 334 additional changes omitted for project

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

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

- src/bokeh/colors/util.py:163:17: TRY200 Use `raise from` to specify exception cause
- src/bokeh/core/property/constraints.py:91:13: TRY200 Use `raise from` to specify exception cause
- src/bokeh/core/property/datetime.py:79:13: TRY200 Use `raise from` to specify exception cause
- src/bokeh/core/property/json.py:68:13: TRY200 Use `raise from` to specify exception cause
- src/bokeh/core/validation/decorators.py:85:21: TRY200 Use `raise from` to specify exception cause
- src/bokeh/document/callbacks.py:354:13: TRY200 Use `raise from` to specify exception cause
- src/bokeh/document/document.py:223:17: TRY200 Use `raise from` to specify exception cause
- src/bokeh/models/plots.py:917:13: TRY200 Use `raise from` to specify exception cause
- src/bokeh/models/sources.py:266:17: TRY200 Use `raise from` to specify exception cause
- src/bokeh/plotting/_graph.py:62:13: TRY200 Use `raise from` to specify exception cause
... 27 additional changes omitted for project

zulip/zulip (+0 -237 violations, +0 -0 fixes)

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

- analytics/views/stats.py:156:9: TRY200 Use `raise from` to specify exception cause
- confirmation/models.py:102:9: TRY200 Use `raise from` to specify exception cause
- corporate/lib/registration.py:115:9: TRY200 Use `raise from` to specify exception cause
- corporate/lib/remote_billing_util.py:124:9: TRY200 Use `raise from` to specify exception cause
- corporate/lib/remote_billing_util.py:166:9: TRY200 Use `raise from` to specify exception cause
- corporate/lib/stripe.py:1019:13: TRY200 Use `raise from` to specify exception cause
- corporate/lib/stripe.py:185:9: TRY200 Use `raise from` to specify exception cause
- corporate/lib/stripe.py:2743:17: TRY200 Use `raise from` to specify exception cause
- corporate/lib/stripe.py:4440:13: TRY200 Use `raise from` to specify exception cause
- corporate/lib/stripe.py:4442:13: TRY200 Use `raise from` to specify exception cause
- corporate/lib/stripe.py:489:17: TRY200 Use `raise from` to specify exception cause
- corporate/lib/stripe.py:498:17: TRY200 Use `raise from` to specify exception cause
- corporate/lib/stripe.py:502:13: TRY200 Use `raise from` to specify exception cause
- corporate/tests/test_stripe.py:1124:17: TRY200 Use `raise from` to specify exception cause
- corporate/tests/test_stripe.py:1337:17: TRY200 Use `raise from` to specify exception cause
- corporate/tests/test_stripe.py:814:13: TRY200 Use `raise from` to specify exception cause
- corporate/views/remote_billing_page.py:139:9: TRY200 Use `raise from` to specify exception cause
- corporate/views/remote_billing_page.py:141:9: TRY200 Use `raise from` to specify exception cause
... 219 additional changes omitted for project

sphinx-doc/sphinx (error)

warning: The `show-source` option has been deprecated in favor of `output-format`'s "full" and "concise" variants. Please update your configuration to use `output-format = <full|concise>` instead.
warning: `RUF011` has been remapped to `B035`.
warning: `TCH006` has been remapped to `TCH010`.
ruff failed
  Cause: Selection of unstable rules without the `--preview` flag is not allowed. Enable preview or remove selection of:
	- FURB131
	- FURB113
	- FURB132

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
TRY200 636 0 636 0 0

Linter (preview)

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

fronzbot/blinkpy (error)

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

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in your configuration:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'mccabe' -> 'lint.mccabe'
  - 'per-file-ignores' -> 'lint.per-file-ignores'


ruff failed
  Cause: Selection of deprecated rule `TRY200` is not allowed when preview is enabled.

sphinx-doc/sphinx (error)

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

warning: The `show-source` option has been deprecated in favor of `output-format`'s "full" and "concise" variants. Please update your configuration to use `output-format = <full|concise>` instead.
ruff failed
  Cause: Selection of deprecated rule `ANN102` is not allowed when preview is enabled.

@zanieb zanieb force-pushed the zb/deprecated-renamed branch from 8d4d156 to 5076945 Compare February 1, 2024 16:30
Base automatically changed from zb/deprecated-renamed to release/0.2.0 February 1, 2024 16:46
@zanieb zanieb enabled auto-merge (squash) February 1, 2024 16:49
@zanieb zanieb mentioned this pull request Feb 1, 2024
@zanieb zanieb merged commit f6812ee into release/0.2.0 Feb 1, 2024
@zanieb zanieb deleted the zb/try200 branch February 1, 2024 16:52
zanieb added a commit that referenced this pull request Feb 1, 2024
Follow-up to #9754 and #9689. Alternative to #9714.
Replaces #7506 and #7507
Same ideas as #9755
Part of #8931
zanieb added a commit that referenced this pull request Feb 1, 2024
For consistency with other redirected rules as in
#9755

Follow-up to #9428
zanieb added a commit that referenced this pull request Feb 1, 2024
Follow-up to #9754 and #9689. Alternative to #9714.

Marks `TRY200` as removed and redirects to `B904` instead of marking as
deprecated and suggesting `B904` instead.
zanieb added a commit that referenced this pull request Feb 1, 2024
Follow-up to #9754 and #9689. Alternative to #9714.
Replaces #7506 and #7507
Same ideas as #9755
Part of #8931
zanieb added a commit that referenced this pull request Feb 1, 2024
For consistency with other redirected rules as in
#9755

Follow-up to #9428
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants