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

[pylint] Add fix for subprocess-run-without-check (PLW1510) #6708

Merged
merged 10 commits into from
Dec 12, 2023

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninja hauntsaninja commented Aug 20, 2023

Let me know if I should care more about whitespace (and would appreciate pointers if so)

@hauntsaninja hauntsaninja marked this pull request as draft August 20, 2023 19:59
@github-actions

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Nov 22, 2023

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +74 -0 fixes in 41 projects)

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

ruff check --no-cache --exit-zero --no-preview --select ALL

+ airflow/providers/google/cloud/hooks/dataflow.py:1033:20: PLW1510 [*] `subprocess.run` without explicit `check` argument
- airflow/providers/google/cloud/hooks/dataflow.py:1033:20: PLW1510 `subprocess.run` without explicit `check` argument
+ dev/breeze/src/airflow_breeze/utils/publish_docs_builder.py:163:30: PLW1510 [*] `subprocess.run` without explicit `check` argument
- dev/breeze/src/airflow_breeze/utils/publish_docs_builder.py:163:30: PLW1510 `subprocess.run` without explicit `check` argument
+ dev/breeze/src/airflow_breeze/utils/publish_docs_builder.py:242:30: PLW1510 [*] `subprocess.run` without explicit `check` argument
- dev/breeze/src/airflow_breeze/utils/publish_docs_builder.py:242:30: PLW1510 `subprocess.run` without explicit `check` argument
+ docs/exts/docs_build/docs_builder.py:164:30: PLW1510 [*] `subprocess.run` without explicit `check` argument
- docs/exts/docs_build/docs_builder.py:164:30: PLW1510 `subprocess.run` without explicit `check` argument
+ docs/exts/docs_build/docs_builder.py:241:30: PLW1510 [*] `subprocess.run` without explicit `check` argument
- docs/exts/docs_build/docs_builder.py:241:30: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/ci/pre_commit/pre_commit_update_common_sql_api_stubs.py:320:5: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/ci/pre_commit/pre_commit_update_common_sql_api_stubs.py:320:5: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/in_container/remove_arm_packages.py:47:5: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/in_container/remove_arm_packages.py:47:5: PLW1510 `subprocess.run` without explicit `check` argument
... 8 additional changes omitted for project

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

ruff check --no-cache --exit-zero --no-preview --select ALL

+ release/system.py:43:18: PLW1510 [*] `subprocess.run` without explicit `check` argument
- release/system.py:43:18: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/hooks/install.py:5:5: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/hooks/install.py:5:5: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/hooks/protect_branches.py:10:22: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/hooks/protect_branches.py:10:22: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/hooks/uninstall.py:5:5: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/hooks/uninstall.py:5:5: PLW1510 `subprocess.run` without explicit `check` argument
+ setup.py:52:16: PLW1510 [*] `subprocess.run` without explicit `check` argument
- setup.py:52:16: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_eslint.py:37:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_eslint.py:37:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_isort.py:58:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_isort.py:58:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_js_license_set.py:50:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_js_license_set.py:50:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_license.py:40:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_license.py:40:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_no_client_server_common.py:48:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_no_client_server_common.py:48:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_no_client_server_common.py:57:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_no_client_server_common.py:57:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_no_ipython_common.py:51:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_no_ipython_common.py:51:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_no_pandas_common.py:53:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
... 13 additional changes omitted for project

freedomofpress/securedrop (+0 -0 violations, +8 -0 fixes)

+ admin/bootstrap.py:276:19: PLW1510 [*] `subprocess.run` without explicit `check` argument
- admin/bootstrap.py:276:19: PLW1510 `subprocess.run` without explicit `check` argument
+ admin/bootstrap.py:281:25: PLW1510 [*] `subprocess.run` without explicit `check` argument
- admin/bootstrap.py:281:25: PLW1510 `subprocess.run` without explicit `check` argument
+ devops/scripts/verify-mo.py:116:16: PLW1510 [*] `subprocess.run` without explicit `check` argument
- devops/scripts/verify-mo.py:116:16: PLW1510 `subprocess.run` without explicit `check` argument
+ securedrop/debian/ossec-common/var/ossec/checksdconfig.py:35:14: PLW1510 [*] `subprocess.run` without explicit `check` argument
- securedrop/debian/ossec-common/var/ossec/checksdconfig.py:35:14: PLW1510 `subprocess.run` without explicit `check` argument

sphinx-doc/sphinx (+0 -0 violations, +6 -0 fixes)

+ sphinx/__init__.py:43:19: PLW1510 [*] `subprocess.run` without explicit `check` argument
- sphinx/__init__.py:43:19: PLW1510 `subprocess.run` without explicit `check` argument
+ sphinx/testing/fixtures.py:214:13: PLW1510 [*] `subprocess.run` without explicit `check` argument
- sphinx/testing/fixtures.py:214:13: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/test_ext_imgconverter.py:13:13: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/test_ext_imgconverter.py:13:13: PLW1510 `subprocess.run` without explicit `check` argument

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLW1510 74 0 0 74 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +74 -0 fixes in 41 projects)

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

ruff check --no-cache --exit-zero --preview --select ALL

+ airflow/providers/google/cloud/hooks/dataflow.py:1033:20: PLW1510 [*] `subprocess.run` without explicit `check` argument
- airflow/providers/google/cloud/hooks/dataflow.py:1033:20: PLW1510 `subprocess.run` without explicit `check` argument
+ dev/breeze/src/airflow_breeze/utils/publish_docs_builder.py:163:30: PLW1510 [*] `subprocess.run` without explicit `check` argument
- dev/breeze/src/airflow_breeze/utils/publish_docs_builder.py:163:30: PLW1510 `subprocess.run` without explicit `check` argument
+ dev/breeze/src/airflow_breeze/utils/publish_docs_builder.py:242:30: PLW1510 [*] `subprocess.run` without explicit `check` argument
- dev/breeze/src/airflow_breeze/utils/publish_docs_builder.py:242:30: PLW1510 `subprocess.run` without explicit `check` argument
+ docs/exts/docs_build/docs_builder.py:164:30: PLW1510 [*] `subprocess.run` without explicit `check` argument
- docs/exts/docs_build/docs_builder.py:164:30: PLW1510 `subprocess.run` without explicit `check` argument
+ docs/exts/docs_build/docs_builder.py:241:30: PLW1510 [*] `subprocess.run` without explicit `check` argument
- docs/exts/docs_build/docs_builder.py:241:30: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/ci/pre_commit/pre_commit_update_common_sql_api_stubs.py:320:5: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/ci/pre_commit/pre_commit_update_common_sql_api_stubs.py:320:5: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/in_container/remove_arm_packages.py:47:5: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/in_container/remove_arm_packages.py:47:5: PLW1510 `subprocess.run` without explicit `check` argument
... 8 additional changes omitted for project

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

ruff check --no-cache --exit-zero --preview --select ALL

+ release/system.py:43:18: PLW1510 [*] `subprocess.run` without explicit `check` argument
- release/system.py:43:18: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/hooks/install.py:5:5: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/hooks/install.py:5:5: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/hooks/protect_branches.py:10:22: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/hooks/protect_branches.py:10:22: PLW1510 `subprocess.run` without explicit `check` argument
+ scripts/hooks/uninstall.py:5:5: PLW1510 [*] `subprocess.run` without explicit `check` argument
- scripts/hooks/uninstall.py:5:5: PLW1510 `subprocess.run` without explicit `check` argument
+ setup.py:52:16: PLW1510 [*] `subprocess.run` without explicit `check` argument
- setup.py:52:16: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_eslint.py:37:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_eslint.py:37:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_isort.py:58:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_isort.py:58:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_js_license_set.py:50:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_js_license_set.py:50:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_license.py:40:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_license.py:40:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_no_client_server_common.py:48:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_no_client_server_common.py:48:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_no_client_server_common.py:57:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_no_client_server_common.py:57:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_no_ipython_common.py:51:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/codebase/test_no_ipython_common.py:51:12: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/codebase/test_no_pandas_common.py:53:12: PLW1510 [*] `subprocess.run` without explicit `check` argument
... 13 additional changes omitted for project

freedomofpress/securedrop (+0 -0 violations, +8 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ admin/bootstrap.py:276:19: PLW1510 [*] `subprocess.run` without explicit `check` argument
- admin/bootstrap.py:276:19: PLW1510 `subprocess.run` without explicit `check` argument
+ admin/bootstrap.py:281:25: PLW1510 [*] `subprocess.run` without explicit `check` argument
- admin/bootstrap.py:281:25: PLW1510 `subprocess.run` without explicit `check` argument
+ devops/scripts/verify-mo.py:116:16: PLW1510 [*] `subprocess.run` without explicit `check` argument
- devops/scripts/verify-mo.py:116:16: PLW1510 `subprocess.run` without explicit `check` argument
+ securedrop/debian/ossec-common/var/ossec/checksdconfig.py:35:14: PLW1510 [*] `subprocess.run` without explicit `check` argument
- securedrop/debian/ossec-common/var/ossec/checksdconfig.py:35:14: PLW1510 `subprocess.run` without explicit `check` argument

sphinx-doc/sphinx (+0 -0 violations, +6 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ sphinx/__init__.py:43:19: PLW1510 [*] `subprocess.run` without explicit `check` argument
- sphinx/__init__.py:43:19: PLW1510 `subprocess.run` without explicit `check` argument
+ sphinx/testing/fixtures.py:214:13: PLW1510 [*] `subprocess.run` without explicit `check` argument
- sphinx/testing/fixtures.py:214:13: PLW1510 `subprocess.run` without explicit `check` argument
+ tests/test_ext_imgconverter.py:13:13: PLW1510 [*] `subprocess.run` without explicit `check` argument
- tests/test_ext_imgconverter.py:13:13: PLW1510 `subprocess.run` without explicit `check` argument

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLW1510 74 0 0 74 0

@T-256
Copy link
Contributor

T-256 commented Nov 22, 2023

shouldn't this fix add to preview?

@charliermarsh
Copy link
Member

@T-256 -- Yup! The change itself isn't complete yet.

@hauntsaninja
Copy link
Contributor Author

Thanks for the ping. Looks like there's an add_argument thing now, so this change is now trivial

@hauntsaninja hauntsaninja marked this pull request as ready for review December 4, 2023 06:45
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh added the fixes Related to suggested fixes for violations label Dec 12, 2023
@charliermarsh charliermarsh changed the title Add an autofix for PLW1510 [pylint] Add fix for subprocess-run-without-check (PLW1510) Dec 12, 2023
@charliermarsh charliermarsh enabled auto-merge (squash) December 12, 2023 05:02
@charliermarsh charliermarsh merged commit cb8eea6 into astral-sh:main Dec 12, 2023
16 checks passed
@hauntsaninja hauntsaninja deleted the w1510-fix branch December 12, 2023 05:13
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.

None yet

3 participants