Skip to content

Conversation

@dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Jun 8, 2025

No description provided.

@dylwil3 dylwil3 added this to the v0.12 milestone Jun 8, 2025
@dylwil3 dylwil3 added the rule Implementing or modifying a lint rule label Jun 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2025

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+91 -0 violations, +0 -0 fixes in 6 projects; 49 projects unchanged)

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

+ tests/formulary/test_thermal_speed.py:400:43: PT028 Test function parameter `kwargs` has default argument

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

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

+ airflow-core/tests/unit/api_fastapi/execution_api/versions/head/test_task_instances.py:1912:100: PT028 Test function parameter `serialized` has default argument
+ airflow-core/tests/unit/listeners/test_listeners.py:108:76: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/listeners/test_listeners.py:133:91: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/listeners/test_listeners.py:148:96: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/listeners/test_listeners.py:162:61: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/listeners/test_listeners.py:72:60: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/listeners/test_listeners.py:87:59: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/models/test_taskinstance.py:1265:96: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/models/test_taskinstance.py:2284:61: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/models/test_taskinstance.py:406:71: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/models/test_timestamp.py:57:49: PT028 Test function parameter `session` has default argument
+ airflow-core/tests/unit/models/test_timestamp.py:69:63: PT028 Test function parameter `session` has default argument
+ helm-tests/tests/helm_tests/airflow_aux/test_container_lifecycle.py:101:54: PT028 Test function parameter `hook_type` has default argument
+ helm-tests/tests/helm_tests/airflow_aux/test_container_lifecycle.py:122:59: PT028 Test function parameter `hook_type` has default argument
+ helm-tests/tests/helm_tests/airflow_aux/test_container_lifecycle.py:167:65: PT028 Test function parameter `hook_type` has default argument
+ helm-tests/tests/helm_tests/airflow_aux/test_container_lifecycle.py:186:64: PT028 Test function parameter `hook_type` has default argument
+ helm-tests/tests/helm_tests/airflow_aux/test_container_lifecycle.py:207:68: PT028 Test function parameter `hook_type` has default argument
+ helm-tests/tests/helm_tests/airflow_aux/test_container_lifecycle.py:40:52: PT028 Test function parameter `hook_type` has default argument
+ helm-tests/tests/helm_tests/airflow_aux/test_container_lifecycle.py:77:45: PT028 Test function parameter `hook_type` has default argument
+ providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py:1030:66: PT028 Test function parameter `initial_batch_size` has default argument
+ providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py:244:58: PT028 Test function parameter `initial_batch_size` has default argument
+ providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py:254:58: PT028 Test function parameter `initial_batch_size` has default argument
+ providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py:264:58: PT028 Test function parameter `initial_batch_size` has default argument
+ providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py:333:58: PT028 Test function parameter `initial_batch_size` has default argument
+ providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py:351:58: PT028 Test function parameter `initial_batch_size` has default argument
... 21 additional changes omitted for project

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

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

+ superset/cli/test_db.py:141:66: PT028 Test function parameter `raw_engine_kwargs` has default argument

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

+ asv_bench/benchmarks/gil.py:39:31: PT028 Test function parameter `num_threads` has default argument
+ asv_bench/benchmarks/gil.py:39:46: PT028 Test function parameter `kwargs_list` has default argument
+ pandas/util/_tester.py:15:41: PT028 Test function parameter `extra_args` has default argument
+ pandas/util/_tester.py:15:68: PT028 Test function parameter `run_doctests` has default argument

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

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

+ tools/lib/test_server.py:56:34: PT028 Test function parameter `skip_provision_check` has default argument
+ tools/lib/test_server.py:57:26: PT028 Test function parameter `external_host` has default argument
+ tools/lib/test_server.py:58:28: PT028 Test function parameter `log_file` has default argument
+ tools/lib/test_server.py:59:18: PT028 Test function parameter `dots` has default argument

astropy/astropy (+35 -0 violations, +0 -0 fixes)

+ astropy/io/votable/tests/test_vo.py:950:36: PT028 Test function parameter `test_path_object` has default argument
+ astropy/modeling/tests/test_models.py:47:41: PT028 Test function parameter `amplitude` has default argument
+ astropy/modeling/tests/test_models.py:47:54: PT028 Test function parameter `frequency` has default argument
+ astropy/stats/tests/test_bayesian_blocks.py:10:36: PT028 Test function parameter `rseed` has default argument
+ astropy/stats/tests/test_bayesian_blocks.py:170:35: PT028 Test function parameter `rseed` has default argument
+ astropy/stats/tests/test_bayesian_blocks.py:20:33: PT028 Test function parameter `rseed` has default argument
+ astropy/stats/tests/test_bayesian_blocks.py:35:47: PT028 Test function parameter `rseed` has default argument
+ astropy/stats/tests/test_histogram.py:101:38: PT028 Test function parameter `N` has default argument
+ astropy/stats/tests/test_histogram.py:101:50: PT028 Test function parameter `rseed` has default argument
+ astropy/stats/tests/test_histogram.py:112:43: PT028 Test function parameter `N` has default argument
+ astropy/stats/tests/test_histogram.py:112:55: PT028 Test function parameter `rseed` has default argument
+ astropy/stats/tests/test_histogram.py:172:30: PT028 Test function parameter `N` has default argument
+ astropy/stats/tests/test_histogram.py:172:42: PT028 Test function parameter `rseed` has default argument
+ astropy/stats/tests/test_histogram.py:17:28: PT028 Test function parameter `N` has default argument
+ astropy/stats/tests/test_histogram.py:17:41: PT028 Test function parameter `rseed` has default argument
+ astropy/stats/tests/test_histogram.py:31:31: PT028 Test function parameter `N` has default argument
+ astropy/stats/tests/test_histogram.py:31:44: PT028 Test function parameter `rseed` has default argument
+ astropy/stats/tests/test_histogram.py:60:28: PT028 Test function parameter `N` has default argument
+ astropy/stats/tests/test_histogram.py:60:41: PT028 Test function parameter `rseed` has default argument
... 16 additional changes omitted for project

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PT028 91 91 0 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 0370d8a to 040fb6b Compare June 8, 2025 19:55
@ntBre ntBre requested a review from AlexWaygood as a code owner June 8, 2025 19:55
@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 040fb6b to 9252447 Compare June 8, 2025 20:18
@AlexWaygood AlexWaygood removed their request for review June 8, 2025 20:27
@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 9252447 to 829acf4 Compare June 9, 2025 00:22
@dylwil3 dylwil3 force-pushed the dylan/stabilize-pt028 branch from f9e2f7f to 3bc7453 Compare June 9, 2025 13:04
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

I think there are definitely some false positives here because of our is_likely_pytest_test function, which is pretty naive (not to say that we can necessarily do any better), but I think that's okay. It seems like a very useful rule for people actually using pytest.

@dylwil3 dylwil3 merged commit a3beb30 into brent/release-0.12.0 Jun 9, 2025
34 checks passed
@dylwil3 dylwil3 deleted the dylan/stabilize-pt028 branch June 9, 2025 19:07
@dylwil3
Copy link
Collaborator Author

dylwil3 commented Jun 9, 2025

I think generally a way to make these rules more accurate is for the user to only enable them in a tests/ directory in the first place

@dylwil3 dylwil3 mentioned this pull request Jun 9, 2025
2 tasks
carljm added a commit to MatthewMckee4/ruff that referenced this pull request Jun 17, 2025
…ence

* main: (71 commits)
  Bump 0.12.0 (astral-sh#18724)
  Revert "[ty] Offer "Did you mean...?" suggestions for unresolved `from` imports and unresolved attributes (astral-sh#18705)" (astral-sh#18721)
  [`flake8-return`] Stabilize only add `return None` at the end when fixing `implicit-return` (`RET503`) (astral-sh#18516)
  [`pyupgrade`] Stabilize `non-pep695-generic-function` (`UP047`) (astral-sh#18524)
  [`pyupgrade`] Stabilize `non-pep695-generic-class` (`UP046`) (astral-sh#18519)
  [`pandas-vet`] Deprecate `pandas-df-variable-name` (`PD901`) (astral-sh#18618)
  [`flake8-bandit`] Remove `suspicious-xmle-tree-usage` (`S320`) (astral-sh#18617)
  Stabilize `dataclass-enum` (`RUF049`) (astral-sh#18570)
  Stabilize `unnecessary-dict-index-lookup` (`PLR1733`) (astral-sh#18571)
  Remove rust-toolchain.toml from sdist (astral-sh#17925)
  Stabilize `starmap-zip` (`RUF058`) (astral-sh#18525)
  [`flake8-logging`] Stabilize `exc-info-outside-except-handler` (`LOG014`) (astral-sh#18517)
  [`pyupgrade`] Stabilize `non-pep604-annotation-optional` (`UP045`) and preview behavior for `non-pep604-annotation-union` (`UP007`) (astral-sh#18505)
  Stabilize `pytest-warns-too-broad` (`PT030`) (astral-sh#18568)
  Stabilize `for-loop-writes` (`FURB122`) (astral-sh#18565)
  Stabilize `pytest-warns-with-multiple-statements` (`PT031`) (astral-sh#18569)
  Stabilize `pytest-parameter-with-default-argument` (`PT028`) (astral-sh#18566)
  Stabilize `nan-comparison` (`PLW0177`) (astral-sh#18559)
  Stabilize `check-and-remove-from-set` (`FURB132`) (astral-sh#18560)
  Stabilize `unnecessary-round` (`RUF057`) (astral-sh#18563)
  ...
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