Skip to content

Conversation

ntBre
Copy link
Contributor

@ntBre ntBre commented Mar 11, 2025

Summary

Stabilizes TC006. The test was already in the right place.

Test Plan

No open issues or PRs. The last related issue was closed on 2025-02-09.

Summary
--

Stabilizes TC006. The test was already in the right place.

Test Plan
--

No open issues or PRs. The last related [issue] was closed on 2025-02-09.

[issue]: #16037
@ntBre ntBre added the rule Implementing or modifying a lint rule label Mar 11, 2025
@ntBre ntBre added this to the v0.10 milestone Mar 11, 2025
Copy link

codspeed-hq bot commented Mar 11, 2025

CodSpeed Performance Report

Merging #16637 will degrade performances by 4.6%

Comparing brent/tc006-0.10 (998869c) with micha/ruff-0.10 (78164ab)

Summary

❌ 1 regressions
✅ 31 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
red_knot_check_file[incremental] 5.2 ms 5.5 ms -4.6%

Copy link
Contributor

github-actions bot commented Mar 11, 2025

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+840 -0 violations, +0 -0 fixes in 11 projects; 44 projects unchanged)

DisnakeDev/disnake (+11 -0 violations, +0 -0 fixes)

+ disnake/abc.py:1242:25: TC006 [*] Add quotes to type expression in `typing.cast()`
+ disnake/abc.py:298:25: TC006 [*] Add quotes to type expression in `typing.cast()`
+ disnake/components.py:766:27: TC006 [*] Add quotes to type expression in `typing.cast()`
+ disnake/ext/commands/base_core.py:211:43: TC006 [*] Add quotes to type expression in `typing.cast()`
+ disnake/ext/commands/core.py:1938:19: TC006 [*] Add quotes to type expression in `typing.cast()`
+ disnake/ext/commands/core.py:1968:19: TC006 [*] Add quotes to type expression in `typing.cast()`
+ disnake/interactions/base.py:221:37: TC006 [*] Add quotes to type expression in `typing.cast()`
+ docs/extensions/fulltoc.py:122:34: TC006 [*] Add quotes to type expression in `typing.cast()`
+ tests/test_abc.py:164:30: TC006 [*] Add quotes to type expression in `typing.cast()`
+ tests/test_abc.py:165:30: TC006 [*] Add quotes to type expression in `typing.cast()`
... 1 additional changes omitted for project

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

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

+ airflow/api/auth/backend/deny_all.py:44:17: TC006 [*] Add quotes to type expression in `typing.cast()`
+ airflow/api_fastapi/core_api/app.py:94:29: TC006 [*] Add quotes to type expression in `typing.cast()`
+ airflow/api_fastapi/core_api/routes/public/dag_report.py:54:26: TC006 [*] Add quotes to type expression in `typing.cast()`
+ airflow/api_fastapi/core_api/routes/public/dag_run.py:251:33: TC006 [*] Add quotes to type expression in `typing.cast()`
+ airflow/api_fastapi/core_api/routes/public/plugins.py:44:22: TC006 [*] Add quotes to type expression in `typing.cast()`
+ airflow/api_fastapi/core_api/routes/public/task_instances.py:303:29: TC006 [*] Add quotes to type expression in `typing.cast()`
+ airflow/api_fastapi/core_api/routes/public/tasks.py:57:20: TC006 [*] Add quotes to type expression in `typing.cast()`
+ airflow/api_fastapi/core_api/routes/public/tasks.py:80:17: TC006 [*] Add quotes to type expression in `typing.cast()`
+ airflow/cli/commands/remote_commands/task_command.py:302:25: TC006 [*] Add quotes to type expression in `typing.cast()`
+ airflow/dag_processing/collection.py:741:23: TC006 [*] Add quotes to type expression in `typing.cast()`
... 161 additional changes omitted for project

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

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

+ superset/charts/api.py:601:22: TC006 [*] Add quotes to type expression in `typing.cast()`
+ superset/charts/api.py:735:22: TC006 [*] Add quotes to type expression in `typing.cast()`
+ superset/commands/dashboard/filter_state/create.py:39:22: TC006 [*] Add quotes to type expression in `typing.cast()`
+ superset/commands/dashboard/filter_state/update.py:36:22: TC006 [*] Add quotes to type expression in `typing.cast()`
+ superset/commands/database/tables.py:145:28: TC006 [*] Add quotes to type expression in `typing.cast()`
+ superset/commands/distributed_lock/get.py:45:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ superset/commands/explore/get.py:116:26: TC006 [*] Add quotes to type expression in `typing.cast()`
+ superset/commands/explore/get.py:130:52: TC006 [*] Add quotes to type expression in `typing.cast()`
+ superset/commands/sql_lab/export.py:101:44: TC006 [*] Add quotes to type expression in `typing.cast()`
+ superset/commands/sql_lab/results.py:111:44: TC006 [*] Add quotes to type expression in `typing.cast()`
... 72 additional changes omitted for project

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

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

+ src/bokeh/core/serialization.py:428:26: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/bokeh/core/serialization.py:537:50: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/bokeh/core/serialization.py:539:53: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/bokeh/core/serialization.py:541:53: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/bokeh/core/serialization.py:543:52: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/bokeh/core/serialization.py:545:50: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/bokeh/core/serialization.py:547:50: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/bokeh/core/serialization.py:549:52: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/bokeh/core/serialization.py:551:52: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/bokeh/core/serialization.py:553:58: TC006 [*] Add quotes to type expression in `typing.cast()`
... 50 additional changes omitted for project

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

+ libs/core/langchain_core/_api/beta_decorator.py:146:29: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/beta_decorator.py:220:29: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/beta_decorator.py:231:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/deprecation.py:219:29: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/deprecation.py:232:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/deprecation.py:253:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/deprecation.py:267:35: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/deprecation.py:314:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/deprecation.py:321:35: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/deprecation.py:341:29: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/_api/deprecation.py:394:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ libs/core/langchain_core/callbacks/file.py:34:26: TC006 [*] Add quotes to type expression in `typing.cast()`
... 198 additional changes omitted for project

latchbio/latch (+7 -0 violations, +0 -0 fixes)

+ src/latch/registry/table.py:511:35: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/latch/registry/table.py:688:34: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/latch/registry/utils.py:38:26: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/latch/registry/utils.py:54:28: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/latch/registry/utils.py:64:22: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/latch_cli/services/register/utils.py:157:32: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/latch_cli/services/register/utils.py:159:24: TC006 [*] Add quotes to type expression in `typing.cast()`

pandas-dev/pandas (+216 -0 violations, +0 -0 fixes)

+ pandas/_config/config.py:778:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/_config/localization.py:159:57: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/_testing/_warnings.py:124:25: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/_testing/_warnings.py:244:29: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/_testing/asserters.py:286:22: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/_testing/asserters.py:779:31: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/_testing/asserters.py:783:31: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/compat/numpy/function.py:172:22: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/core/algorithms.py:1290:26: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/core/algorithms.py:1292:35: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/core/algorithms.py:175:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ pandas/core/algorithms.py:180:25: TC006 [*] Add quotes to type expression in `typing.cast()`
... 204 additional changes omitted for project

python-poetry/poetry (+1 -0 violations, +0 -0 fixes)

+ src/poetry/inspection/lazy_wheel.py:278:31: TC006 [*] Add quotes to type expression in `typing.cast()`

scikit-build/scikit-build-core (+8 -0 violations, +0 -0 fixes)

+ src/scikit_build_core/hatch/plugin.py:49:29: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/scikit_build_core/settings/sources.py:642:29: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/scikit_build_core/settings/sources.py:643:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ src/scikit_build_core/settings/sources.py:644:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ tests/test_builder.py:108:26: TC006 [*] Add quotes to type expression in `typing.cast()`
+ tests/test_builder.py:128:26: TC006 [*] Add quotes to type expression in `typing.cast()`
+ tests/test_builder.py:141:28: TC006 [*] Add quotes to type expression in `typing.cast()`
+ tests/test_pyproject_pep660.py:14:24: TC006 [*] Add quotes to type expression in `typing.cast()`

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

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

+ analytics/views/stats.py:453:13: TC006 [*] Add quotes to type expression in `typing.cast()`
+ confirmation/models.py:155:20: TC006 [*] Add quotes to type expression in `typing.cast()`
+ corporate/lib/remote_billing_util.py:109:9: TC006 [*] Add quotes to type expression in `typing.cast()`
+ corporate/tests/test_stripe.py:540:13: TC006 [*] Add quotes to type expression in `typing.cast()`
+ corporate/tests/test_stripe.py:6363:38: TC006 [*] Add quotes to type expression in `typing.cast()`
+ corporate/tests/test_stripe.py:6463:38: TC006 [*] Add quotes to type expression in `typing.cast()`
+ corporate/tests/test_stripe.py:6973:17: TC006 [*] Add quotes to type expression in `typing.cast()`
+ corporate/views/remote_billing_page.py:458:23: TC006 [*] Add quotes to type expression in `typing.cast()`
+ zerver/data_import/slack_message_conversion.py:298:21: TC006 [*] Add quotes to type expression in `typing.cast()`
+ zerver/lib/addressee.py:139:31: TC006 [*] Add quotes to type expression in `typing.cast()`
... 33 additional changes omitted for project

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

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
TC006 840 840 0 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre
Copy link
Contributor Author

ntBre commented Mar 11, 2025

I only spot-checked the ecosystem results here since there are 839 😅 The ones I saw looked like true positives. I'm just a bit confused about the +0 fixes since this should always be fixable, and none of the examples I checked had comments to make it unsafe.

@ntBre ntBre mentioned this pull request Mar 12, 2025
2 tasks
@Daverball
Copy link
Contributor

I only spot-checked the ecosystem results here since there are 839 😅 The ones I saw looked like true positives. I'm just a bit confused about the +0 fixes since this should always be fixable, and none of the examples I checked had comments to make it unsafe.

I think the fixes column has been broken for quite a while now, even in my original PRs for implementing TC006-008 back in November the ecosystem results showed no fixes. I never have personally experienced it showing anything other than +0 -0 fixes in any of my PRS since either.

Perhaps the concise output formatting was changed at some point or a change to the supplied command line parameters meant that fixes are never part of the output. Maybe it would be more reliable to use a machine readable output format like json for ruff-ecosystem.

@MichaReiser
Copy link
Member

I only spot-checked the ecosystem results here since there are 839 😅 The ones I saw looked like true positives. I'm just a bit confused about the +0 fixes since this should always be fixable, and none of the examples I checked had comments to make it unsafe.

It's a bit confusing :) The ecosystem check first matches diagnostics between runs and then computes how many new or no longer existing fixes there are. That means, fixes is a diff between existing diagnostics. It doesn't account for new diagnostics.

You can expand the diagnostics and each one with a [*] has a fix. Clicking through, it seems almost all of them have a fix.

@ntBre ntBre merged commit 2daa9da into micha/ruff-0.10 Mar 12, 2025
20 of 21 checks passed
@ntBre ntBre deleted the brent/tc006-0.10 branch March 12, 2025 18:54
MichaReiser pushed a commit that referenced this pull request Mar 13, 2025
…6637)

Summary
--

Stabilizes TC006. The test was already in the right place.

Test Plan
--

No open issues or PRs. The last related [issue] was closed on
2025-02-09.

[issue]: #16037
MichaReiser pushed a commit that referenced this pull request Mar 13, 2025
…6637)

Summary
--

Stabilizes TC006. The test was already in the right place.

Test Plan
--

No open issues or PRs. The last related [issue] was closed on
2025-02-09.

[issue]: #16037
dcreager added a commit that referenced this pull request Mar 14, 2025
* main: (53 commits)
  [syntax-errors] Tuple unpacking in `for` statement iterator clause before Python 3.9 (#16558)
  Ruff v0.10 Release (#16708)
  Add new `noqa` specification to the docs (#16703)
  describe requires-python fallback in docs (#16704)
  [red-knot] handle cycles in MRO/bases resolution (#16693)
  [red-knot] Auto generate statement nodes (#16645)
  [`pylint`] Better inference for `str.strip` (`PLE310`) (#16671)
  [`pylint`] Improve `repeated-equality-comparison` fix to use a `set` when all elements are hashable (`PLR1714`) (#16685)
  [`pylint`/`pep8-naming`] Check `__new__` argument name in `bad-staticmethod-argument` and not `invalid-first-argument-name-for-class-method` (`PLW0211`/`N804`) (#16676)
  [`flake8-pyi`] Stabilize fix for `unused-private-type-var` (`PYI018`) (#16682)
  [`flake8-bandit`] Deprecate `suspicious-xmle-tree-usage` (`S320`) (#16680)
  [`flake8-simplify`] Avoid double negation in fixes (`SIM103`) (#16684)
  [`pyupgrade`]: Improve diagnostic range for `redundant-open-mode` (`UP015`) (#16672)
  Consider all `TYPE_CHECKING` symbols for type-checking blocks (#16669)
  [`pep8-naming`]: Ignore methods decorated with `@typing.override` (`invalid-argument-name`) (#16667)
  Stabilize FURB169 preview behavior (#16666)
  [`pylint`] Detect invalid default value type for `os.environ.get` (`PLW1508`) (#16674)
  [`flake8-pytest-style`] Allow for loops with empty bodies (`PT012`, `PT031`) (#16678)
  [`pyupgrade`]: Deprecate `non-pep604-isinstance` (`UP038`) (#16681)
  [`flake8-type-checking`] Stabilize `runtime-cast-value` (`TC006`) (#16637)
  ...
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.

3 participants