-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Avoid missing namespace violations in scripts with shebangs #8710
Conversation
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
INP001 | 79 | 0 | 79 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+0 -79 violations, +0 -0 fixes in 41 projects)
apache/airflow (+0 -75 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --select ALL --preview
- dev/chart/build_changelog_annotations.py:1:1: INP001 File `dev/chart/build_changelog_annotations.py` is part of an implicit namespace package. Add an `__init__.py`. - dev/example_dags/update_example_dags_paths.py:1:1: INP001 File `dev/example_dags/update_example_dags_paths.py` is part of an implicit namespace package. Add an `__init__.py`. - dev/stats/calculate_statistics_provider_testing_issues.py:1:1: INP001 File `dev/stats/calculate_statistics_provider_testing_issues.py` is part of an implicit namespace package. Add an `__init__.py`. - dev/stats/get_important_pr_candidates.py:1:1: INP001 File `dev/stats/get_important_pr_candidates.py` is part of an implicit namespace package. Add an `__init__.py`. - dev/system_tests/update_issue_status.py:1:1: INP001 File `dev/system_tests/update_issue_status.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_base_operator_partial_arguments.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_base_operator_partial_arguments.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_boring_cyborg.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_boring_cyborg.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_breeze_cmd_line.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_breeze_cmd_line.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_changelog_duplicates.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_changelog_duplicates.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_chart_schema.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_chart_schema.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_aiobotocore_optional.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_aiobotocore_optional.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_airflow_k8s_not_used.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_airflow_k8s_not_used.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_cncf_k8s_used_for_k8s_executor_only.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_cncf_k8s_used_for_k8s_executor_only.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_deferrable_default.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_deferrable_default.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_google_re2_imports.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_google_re2_imports.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_init_in_tests.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_init_in_tests.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_lazy_logging.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_lazy_logging.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_license.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_license.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_order_dockerfile_extras.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_order_dockerfile_extras.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_order_setup.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_order_setup.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_pre_commit_hooks.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_pre_commit_hooks.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_provider_airflow_compatibility.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_provider_airflow_compatibility.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_provider_docs.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_provider_docs.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_provider_yaml_files.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_provider_yaml_files.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_providers_init.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_providers_init.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_providers_subpackages_all_have_init.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_providers_subpackages_all_have_init.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_setup_extra_packages_ref.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_setup_extra_packages_ref.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_system_tests.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_system_tests.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_check_system_tests_hidden_in_index.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_check_system_tests_hidden_in_index.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_checkout_no_credentials.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_checkout_no_credentials.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_compile_www_assets.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_compile_www_assets.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_compile_www_assets_dev.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_compile_www_assets_dev.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_decorator_operator_implements_custom_name.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_decorator_operator_implements_custom_name.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_docstring_param_type.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_docstring_param_type.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_generate_pypi_readme.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_generate_pypi_readme.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_helm_lint.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_helm_lint.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_inline_scripts_in_docker.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_inline_scripts_in_docker.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_insert_extras.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_insert_extras.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_json_schema.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_json_schema.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_lint_dockerfile.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_lint_dockerfile.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_local_yml_mounts.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_local_yml_mounts.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_migration_reference.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_migration_reference.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_mypy.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_mypy.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_new_session_in_provide_session.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_new_session_in_provide_session.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_newsfragments.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_newsfragments.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_replace_bad_characters.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_replace_bad_characters.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/ci/pre_commit/pre_commit_sort_in_the_wild.py:1:1: INP001 File `scripts/ci/pre_commit/pre_commit_sort_in_the_wild.py` is part of an implicit namespace package. Add an `__init__.py`. ... 28 additional changes omitted for project
bokeh/bokeh (+0 -2 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --select ALL --preview
- examples/output/apis/server_document/bokeh_server.py:1:1: INP001 File `examples/output/apis/server_document/bokeh_server.py` is part of an implicit namespace package. Add an `__init__.py`. - scripts/milestone.py:1:1: INP001 File `scripts/milestone.py` is part of an implicit namespace package. Add an `__init__.py`.
rotki/rotki (+0 -2 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --preview
- .github/scripts/notifier.py:1:1: INP001 File `.github/scripts/notifier.py` is part of an implicit namespace package. Add an `__init__.py`. - packaging/docker/entrypoint.py:1:1: INP001 File `packaging/docker/entrypoint.py` is part of an implicit namespace package. Add an `__init__.py`.
Changes by rule (1 rules affected)
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
INP001 | 79 | 0 | 79 | 0 | 0 |
Is this a bug fix? Arguably this is a significant change in scope and should be gated by preview. The ecosystem results suggest this will affect people. I'm okay with it since it is a reasonable reduction in scope, but it seems worth raising. |
The ecosystem changes are clear fixes, right? The impact isn't breakage but less breakage. How does that influence your preview process? |
Good callout, although I think this is okay because it's a reduction in scope. |
Summary
I think it's reasonable to avoid raising
INP001
for scripts, and shebangs are one sufficient way to detect scripts.Closes #8690.