unref 0.2.2__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unref-0.2.2 → unref-0.3.0}/.github/workflows/ci.yml +60 -13
- {unref-0.2.2 → unref-0.3.0}/.github/workflows/release.yml +3 -1
- {unref-0.2.2 → unref-0.3.0}/.github/workflows/util/setup_python/action.yml +4 -0
- {unref-0.2.2 → unref-0.3.0}/.pre-commit-hooks.yaml +1 -1
- {unref-0.2.2 → unref-0.3.0}/Cargo.lock +63 -1
- {unref-0.2.2 → unref-0.3.0}/Cargo.toml +12 -2
- {unref-0.2.2 → unref-0.3.0}/PKG-INFO +6 -8
- {unref-0.2.2 → unref-0.3.0}/README.md +4 -6
- {unref-0.2.2 → unref-0.3.0}/docs/configuration.md +12 -1
- unref-0.3.0/docs/faq.md +24 -0
- unref-0.3.0/docs/index.md +49 -0
- unref-0.2.2/docs/index.md → unref-0.3.0/docs/usage.md +17 -42
- {unref-0.2.2 → unref-0.3.0}/linters/cspell/words.txt +5 -0
- {unref-0.2.2 → unref-0.3.0}/pyproject.toml +1 -1
- {unref-0.2.2 → unref-0.3.0}/scripts/benchmark.py +21 -15
- {unref-0.2.2 → unref-0.3.0}/scripts/ecosystem.py +2 -1
- {unref-0.2.2 → unref-0.3.0}/src/engine.rs +15 -2
- {unref-0.2.2 → unref-0.3.0}/src/frameworks.rs +129 -8
- {unref-0.2.2 → unref-0.3.0}/src/main.rs +11 -2
- {unref-0.2.2 → unref-0.3.0}/src/models.rs +4 -1
- {unref-0.2.2 → unref-0.3.0}/src/references.rs +12 -0
- {unref-0.2.2 → unref-0.3.0}/tests/_cli/test_config.py +1 -1
- unref-0.3.0/tests/cases/frameworks_celery/myapp/tasks.py +72 -0
- unref-0.3.0/tests/cases/frameworks_celery/proj/celery.py +15 -0
- unref-0.3.0/tests/cases/frameworks_celery/proj/settings.py +9 -0
- unref-0.3.0/tests/cases/frameworks_django/polls/migration_base.py +8 -0
- unref-0.3.0/tests/cases/frameworks_django/polls/migrations/0001_initial.py +26 -0
- unref-0.3.0/tests/cases/frameworks_django/polls/migrations/0002_imported.py +6 -0
- unref-0.3.0/tests/cases/frameworks_django/polls/migrations/0003_defined.py +6 -0
- unref-0.3.0/tests/cases/frameworks_django/polls/migrations/0004_custom_base.py +6 -0
- unref-0.3.0/tests/cases/frameworks_flask/handlers.py +44 -0
- unref-0.3.0/tests/cases/package/pkg/sub/__init__.py +0 -0
- unref-0.3.0/tests/cases/standard_library/.venv/lib/python3.13/os.py +0 -0
- unref-0.3.0/tests/cases/standard_library/.venv/lib/python3.14/os.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/zensical.toml +3 -1
- {unref-0.2.2 → unref-0.3.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {unref-0.2.2 → unref-0.3.0}/.github/actionlint.yaml +0 -0
- {unref-0.2.2 → unref-0.3.0}/.gitignore +0 -0
- {unref-0.2.2 → unref-0.3.0}/.readthedocs.yaml +0 -0
- {unref-0.2.2 → unref-0.3.0}/CONTRIBUTING.md +0 -0
- {unref-0.2.2 → unref-0.3.0}/LICENSE +0 -0
- {unref-0.2.2 → unref-0.3.0}/assets/benchmark.svg +0 -0
- {unref-0.2.2 → unref-0.3.0}/docs/rules.md +0 -0
- {unref-0.2.2 → unref-0.3.0}/linters/cspell.json +0 -0
- {unref-0.2.2 → unref-0.3.0}/linters/mypy.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/linters/ruff.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/linters/taplo.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/linters/ty.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/linters/unref.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/linters/yamllint.yaml +0 -0
- {unref-0.2.2 → unref-0.3.0}/prek.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/scripts/release.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/classes.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/config.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/definitions.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/discover.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/external.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/files.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/ignores.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/modules.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/positions.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/symbols.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/src/transitive.rs +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/_cli/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/_cli/_files.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/_cli/test_environment.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/_cli/test_general.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/_cli/test_output.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/_unref.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/all_exports/all_exports.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/all_exports/all_exports_forms.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/all_exports/all_exports_forms_annotated.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/all_exports/all_exports_not_strings.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/all_exports/string_not_in_all.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/ast_node_visitor/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/attribute_of_module/helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/attribute_of_module/local.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/attribute_of_module/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/attribute_of_module/pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/attribute_of_module/pkg/mod.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/attribute_of_module/pkg/other.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/attribute_of_module/pkg/sibling.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/attribute_of_module/pkg/third.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/columns/ascii.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/columns/cp1252.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/columns/euc_jp.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/columns/latin1.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/columns/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/columns/utf8.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/compiled_submodule_star/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/compiled_submodule_star/pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/config_in_parent/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/config_in_parent/scripts/tool.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/config_in_parent/src/app/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/config_in_parent/src/app/cli.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/config_in_parent/src/app/skip.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/decorated_function/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/default_excluded/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/default_excluded/node_modules/use.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/assignment_to_other_object.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/attribute_read.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/class_.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/class_attribute.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/method_called.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/method_without_self.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/name_read.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/nested_function.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/property_setter.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/recursive_function.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/definitions/type_alias.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/dummy_variable_rgx/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/dummy_variable_rgx/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/dunders/dunder_function.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/dunders/dunder_method.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/dunders/dunder_variable.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/dunders/not_dunder.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/empty_file/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/entry_points/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/entry_points/pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/entry_points/pkg/gui.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/entry_points/pkg/plugins.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/entry_points/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/enum_members/enums.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/enum_members/fruits/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/enum_members/fruits/enums.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/enum_members/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude/generated/deep/module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude/generated/module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude/pkg/generated/module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude/single.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude_patterns/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude_patterns/node_modules/use.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude_patterns/pkg/fixtures/use.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude_patterns/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude_patterns/scripts/keep.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/exclude_patterns/scripts/one.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class/reexport.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class_getattr/lazy.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class_getattr/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class_getattr/not_lazy.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class_nested/lazy.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class_nested/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class_nested/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class_nested/reexport.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class_nested/vendored/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_base_class_nested/vendored/outer.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_compiled_star/.venv/bin/python +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_compiled_star/.venv/lib/python3.15/site-packages/pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_compiled_star/.venv/lib/python3.15/site-packages/pkg/dotted.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_compiled_star/.venv/lib/python3.15/site-packages/pkg/other.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_compiled_star/.venv/lib/python3.15/site-packages/pkg/stable.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_compiled_star/.venv/lib/python3.15/site-packages/pkg/tagged.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_compiled_star/.venv/pyvenv.cfg +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_compiled_star/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_compiled_star/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/.venv/bin/python +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/.venv/lib/python3.15/site-packages/editable.pth +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/.venv/lib/python3.15/site-packages/project_only/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/.venv/lib/python3.15/site-packages/project_only/types.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/.venv/lib/python3.15/site-packages/unreadable.pth/README.txt +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/.venv/pythonpath/project_only/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/.venv/pythonpath/project_only/types.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/.venv/pyvenv.cfg +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/.venv/src/editable_module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_environment/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_missing_star/.venv/lib/python3.15/site-packages/pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_missing_star/.venv/lib/python3.15/site-packages/pkg/optional.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_missing_star/.venv/lib/python3.15/site-packages/pkg/other.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_missing_star/.venv/pyvenv.cfg +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_missing_star/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/external_missing_star/pyproject.toml +0 -0
- {unref-0.2.2/tests/cases/frameworks_django/mysite → unref-0.3.0/tests/cases/frameworks_celery/myapp}/__init__.py +0 -0
- {unref-0.2.2/tests/cases/frameworks_django/other → unref-0.3.0/tests/cases/frameworks_celery/proj}/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_dataclasses/models.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/manage.py +0 -0
- {unref-0.2.2/tests/cases/frameworks_django/polls → unref-0.3.0/tests/cases/frameworks_django/mysite}/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/mysite/asgi.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/mysite/base.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/mysite/settings.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/mysite/urls.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/mysite/wsgi.py +0 -0
- {unref-0.2.2/tests/cases/frameworks_django_settings/config → unref-0.3.0/tests/cases/frameworks_django/other}/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/other/settings.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/other/urls.py +0 -0
- {unref-0.2.2/tests/cases/frameworks_django_settings/config/settings → unref-0.3.0/tests/cases/frameworks_django/polls}/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/polls/apps.py +0 -0
- {unref-0.2.2/tests/cases/hidden_directory/pkg → unref-0.3.0/tests/cases/frameworks_django/polls/migrations}/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/polls/urls.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django/polls/views.py +0 -0
- {unref-0.2.2/tests/cases/namespace_package/pkg → unref-0.3.0/tests/cases/frameworks_django_settings/config}/__init__.py +0 -0
- {unref-0.2.2/tests/cases/override_base_class_external/vendored → unref-0.3.0/tests/cases/frameworks_django_settings/config/settings}/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django_settings/config/settings/local.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django_settings/config/settings/production.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django_settings/config/urls.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_django_settings/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_fastapi/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_fastapi/routers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_fastapi/test_local.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_flask/app.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_flask/cli.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_flask/views.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_flask/wsgi.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/bin/python +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic/deprecated/class_validators.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic/fields.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic/functional_serializers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic/functional_validators.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic/v1/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic/v1/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic_settings/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/lib/python3.15/site-packages/pydantic_settings/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/.venv/pyvenv.cfg +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pydantic/models.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pytest/bases.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pytest/helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pytest/tests/conftest.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pytest/tests/module_test.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pytest/tests/test_asyncio.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pytest/tests/test_inheritance.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_pytest/tests/test_module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_selected/docs/conf.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_selected/models.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_selected/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_selected/test_module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sphinx/docs/conf.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sphinx/other/conf.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sphinx/settings.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sphinx_configuration/docs/source/conf.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sphinx_configuration/other/conf.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sphinx_configuration/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sqlalchemy/chained.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sqlalchemy/legacy.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sqlalchemy/models.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_sqlalchemy/other.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_unittest/base.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_unittest/checks.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_unittest/mixins.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/frameworks_unittest/testsuite.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/function/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/gitignore/.gitignore +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/gitignore/generated/use.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/gitignore/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/gitignore/nested/.gitignore +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/gitignore/nested/scratch_nested.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/gitignore/scratch_kept.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/gitignore/scratch_one.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/hidden_directory/.github/scripts/run.py +0 -0
- {unref-0.2.2/tests/cases/package → unref-0.3.0/tests/cases/hidden_directory}/pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/hidden_directory/pkg/util.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/ignore_comment/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/ignore_comment/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/ignore_comment/without_comment.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/ignore_comment_invalid/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/function_only_imported.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/function_only_imported_helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_from_module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_from_module_helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_from_module_other.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_from_package.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_from_package_pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_from_package_pkg/module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_lazy.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_lazy_helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_lazy_other.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_relative_pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_relative_pkg/helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_relative_pkg/sub/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_relative_pkg/sub/module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_star.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_star_helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_star_scope.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_star_scope_helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_star_with_all.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_star_with_all_helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_unresolved.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/import_unresolved_other.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/reexport_same_name.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/reexport_same_name_pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/reexport_same_name_pkg/colors.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/reexport_same_name_pkg/tool.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/same_name_in_other_module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/imports/same_name_in_other_module_other.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/class_body_read.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_class_body.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_closure.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_comprehension.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_comprehension_unpacking.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_default.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_function.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_function_closure.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_function_global.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_function_nonlocal.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_global.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_import.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_lambda.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_match.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_parameter.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_targets.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_variable.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/local_scopes/local_variable_read.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/match_class_pattern/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/match_class_pattern/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_class.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_external_base.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_metaclass.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_mixin.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_name_imported.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_name_imported_jobs.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_name_read.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_private_helper.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_protocol.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_self.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_super.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_template_method.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_unknown_base.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/member_unknown_receiver.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/same_name_elsewhere.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/shapes/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/member_receivers/shapes/models.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/method/main.py +0 -0
- {unref-0.2.2/tests/cases/package/pkg/sub → unref-0.3.0/tests/cases/namespace_package/pkg}/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/namespace_package/pkg/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/namespace_package/pkg/sub/deeper/mod.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/namespace_package/pkg/sub/mod.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/namespace_package/top/inner/mod.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/namespace_package/top/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/non_python_file/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/non_python_file/notes.txt +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override/conftest.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override/src/module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override/tests/test_module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override/tests/unit/test_unit.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/children.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/cycle_first.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/cycle_second.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/models.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/pkg/base.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/star_cycle.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/stars/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/stars/first.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class/stars/second.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class_and_path/models/model.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class_and_path/other.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class_and_path/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class_external/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class_external/pyproject.toml +0 -0
- /unref-0.2.2/tests/cases/standard_library/.venv/lib/python3.13/os.py → /unref-0.3.0/tests/cases/override_base_class_external/vendored/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class_external/vendored/base.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class_external/vendored/broken.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_base_class_external/vendored/namespace/module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_class_decorator/decorators.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_class_decorator/models.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_class_decorator/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_class_decorator_and_base_class/models.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/override_class_decorator_and_base_class/pyproject.toml +0 -0
- /unref-0.2.2/tests/cases/standard_library/.venv/lib/python3.14/os.py → /unref-0.3.0/tests/cases/package/pkg/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/package/pkg/module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/package/pkg/sub/module.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/quoted_annotations/quoted_annotation.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/quoted_annotations/quoted_annotation_nested.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/quoted_annotations/quoted_annotation_self.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/quoted_annotations/quoted_cast.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/quoted_annotations/quoted_plain_string.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/quoted_annotations/quoted_type_alias.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/quoted_annotations/quoted_type_var.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/reexport_cycle/first/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/reexport_cycle/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/reexport_cycle/second/__init__.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/reexport_cycle/second/values.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/standard_library/.venv/lib/python3.13/handlers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/standard_library/.venv/lib/python3.14/handlers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/standard_library/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/standard_library/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/syntax_error/bad.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/syntax_error/good.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/syntax_error/undecodable.txt +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/syntax_error/unknown_encoding.txt +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/syntax_warning/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/transitive/transitive.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/transitive/used_only_by_unused.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/transitive/used_only_by_unused_helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/transitive/used_only_by_unused_star.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/transitive/used_only_by_unused_star_helpers.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/transitive/used_only_by_unused_star_star.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/transitive/used_only_by_unused_star_star_used.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/typed_dict/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/typed_dict/models.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/used_decorator/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/used_decorator/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/used_name/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/used_name/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/used_only_by_unused_root/main.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/used_only_by_unused_root/pyproject.toml +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/dummy_variable.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/instance_attribute.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/instance_attribute_declared.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/underscore.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/variable.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/variable_for_loop.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/variable_in_block.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/variable_only_written.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/variable_reassigned.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/variable_unpacking.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/variable_walrus.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/cases/variables/variable_with.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/pytest.ini +0 -0
- {unref-0.2.2 → unref-0.3.0}/tests/test_cases.py +0 -0
- {unref-0.2.2 → unref-0.3.0}/uv.lock +0 -0
|
@@ -4,6 +4,10 @@ on:
|
|
|
4
4
|
pull_request:
|
|
5
5
|
branches: [main]
|
|
6
6
|
|
|
7
|
+
# Saves the caches, which pull requests can read only from main.
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
|
|
7
11
|
workflow_dispatch:
|
|
8
12
|
|
|
9
13
|
# A new push to a PR supersedes its in-flight run; manual runs are never cancelled.
|
|
@@ -21,8 +25,9 @@ jobs:
|
|
|
21
25
|
- name: Setup Python
|
|
22
26
|
uses: ./.github/workflows/util/setup_python
|
|
23
27
|
|
|
24
|
-
- name: prek cache
|
|
25
|
-
|
|
28
|
+
- name: Restore the prek cache
|
|
29
|
+
id: prek-cache
|
|
30
|
+
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
26
31
|
with:
|
|
27
32
|
path: ~/.cache/prek
|
|
28
33
|
key: ci-prek-cache-${{ hashFiles('prek.toml') }}
|
|
@@ -30,6 +35,14 @@ jobs:
|
|
|
30
35
|
- name: Run prek
|
|
31
36
|
run: prek run -v --show-diff-on-failure --color=always --all-files
|
|
32
37
|
|
|
38
|
+
# Only main saves caches, as each pull request would save its own copy.
|
|
39
|
+
- name: Save the prek cache
|
|
40
|
+
if: github.ref == 'refs/heads/main' && steps.prek-cache.outputs.cache-hit != 'true'
|
|
41
|
+
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
42
|
+
with:
|
|
43
|
+
path: ~/.cache/prek
|
|
44
|
+
key: ${{ steps.prek-cache.outputs.cache-primary-key }}
|
|
45
|
+
|
|
33
46
|
docs:
|
|
34
47
|
name: Docs
|
|
35
48
|
runs-on: ubuntu-latest
|
|
@@ -38,9 +51,13 @@ jobs:
|
|
|
38
51
|
|
|
39
52
|
- name: Setup Python
|
|
40
53
|
uses: ./.github/workflows/util/setup_python
|
|
54
|
+
with:
|
|
55
|
+
install-project: "false"
|
|
41
56
|
|
|
42
57
|
- name: Build docs
|
|
43
|
-
run:
|
|
58
|
+
run: |
|
|
59
|
+
uv sync --frozen --no-install-project --group docs
|
|
60
|
+
zensical build --strict
|
|
44
61
|
|
|
45
62
|
type-check:
|
|
46
63
|
name: Type Checks
|
|
@@ -82,16 +99,17 @@ jobs:
|
|
|
82
99
|
steps:
|
|
83
100
|
# A pull request is checked out as its merge into the current main, which is the merge's first parent. The
|
|
84
101
|
# base SHA of the event can be an older main, whose later commits would count as changes of the PR. A manual
|
|
85
|
-
# run compares the branch it runs on with main.
|
|
102
|
+
# run compares the branch it runs on with main. A push to main only builds the head, to save its caches.
|
|
86
103
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
87
104
|
with:
|
|
88
105
|
fetch-depth: 2
|
|
89
106
|
|
|
90
107
|
- name: Checkout the base
|
|
108
|
+
id: base
|
|
91
109
|
env:
|
|
92
110
|
EVENT: ${{ github.event_name }}
|
|
93
111
|
run: |
|
|
94
|
-
if [ "$EVENT"
|
|
112
|
+
if [ "$EVENT" != "workflow_dispatch" ]; then
|
|
95
113
|
base=HEAD^1
|
|
96
114
|
else
|
|
97
115
|
git fetch --depth=1 origin main
|
|
@@ -99,6 +117,7 @@ jobs:
|
|
|
99
117
|
fi
|
|
100
118
|
git worktree add --detach base "$base"
|
|
101
119
|
git -C base log -1 --format='Base: %h %s'
|
|
120
|
+
echo "sha=$(git -C base rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
|
102
121
|
|
|
103
122
|
- uses: ./.github/workflows/util/setup_python
|
|
104
123
|
with:
|
|
@@ -107,27 +126,55 @@ jobs:
|
|
|
107
126
|
- name: Rust cache
|
|
108
127
|
uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
|
109
128
|
with:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
129
|
+
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
130
|
+
|
|
131
|
+
# Each push to main saves its binary, so that a pull request builds the base only when the run of its main
|
|
132
|
+
# has not finished.
|
|
133
|
+
- name: Restore the base
|
|
134
|
+
id: restore-base
|
|
135
|
+
if: github.event_name != 'push'
|
|
136
|
+
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
137
|
+
with:
|
|
138
|
+
path: binary
|
|
139
|
+
key: binary-${{ steps.base.outputs.sha }}
|
|
113
140
|
|
|
114
|
-
- name: Build the head
|
|
141
|
+
- name: Build the head
|
|
142
|
+
run: cargo build --release --locked
|
|
143
|
+
|
|
144
|
+
- name: Build the base
|
|
145
|
+
if: github.event_name != 'push' && steps.restore-base.outputs.cache-hit != 'true'
|
|
115
146
|
run: |
|
|
116
|
-
cargo build --release --locked
|
|
117
147
|
cargo build --release --locked --manifest-path base/Cargo.toml
|
|
148
|
+
mkdir -p binary
|
|
149
|
+
cp base/target/release/unref binary/
|
|
150
|
+
|
|
151
|
+
- name: Copy the binary of main
|
|
152
|
+
if: github.event_name == 'push'
|
|
153
|
+
run: |
|
|
154
|
+
mkdir -p binary
|
|
155
|
+
cp target/release/unref binary/
|
|
156
|
+
|
|
157
|
+
- name: Save the binary of main
|
|
158
|
+
if: github.event_name == 'push'
|
|
159
|
+
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
160
|
+
with:
|
|
161
|
+
path: binary
|
|
162
|
+
key: binary-${{ github.sha }}
|
|
118
163
|
|
|
119
164
|
# Shows the findings that the head adds or removes on open source projects. It never fails the job, not even
|
|
120
165
|
# when a project cannot be cloned.
|
|
121
166
|
- name: Compare the findings on open source projects
|
|
167
|
+
if: github.event_name != 'push'
|
|
122
168
|
continue-on-error: true
|
|
123
|
-
run: python scripts/ecosystem.py
|
|
169
|
+
run: python scripts/ecosystem.py binary/unref target/release/unref ecosystem.md
|
|
124
170
|
|
|
125
171
|
# Fails when the head is too slow, after it writes its report, which the next steps then still post.
|
|
126
172
|
- name: Compare the speed
|
|
127
|
-
|
|
173
|
+
if: github.event_name != 'push'
|
|
174
|
+
run: python scripts/benchmark.py compare binary/unref target/release/unref benchmark.md
|
|
128
175
|
|
|
129
176
|
- name: Write the report and the job summary
|
|
130
|
-
if: ${{ !cancelled() }}
|
|
177
|
+
if: ${{ !cancelled() && github.event_name != 'push' }}
|
|
131
178
|
run: |
|
|
132
179
|
for file in benchmark.md ecosystem.md; do
|
|
133
180
|
if [ -f "$file" ]; then cat "$file"; echo; fi
|
|
@@ -15,7 +15,8 @@ jobs:
|
|
|
15
15
|
matrix:
|
|
16
16
|
include:
|
|
17
17
|
- {runner: ubuntu-latest, target: x86_64, manylinux: auto}
|
|
18
|
-
|
|
18
|
+
# jemalloc on aarch64 Linux takes pages of up to 64 KiB, which some kernels use, as ruff's.
|
|
19
|
+
- {runner: ubuntu-latest, target: aarch64, manylinux: auto, docker-options: -e JEMALLOC_SYS_WITH_LG_PAGE=16}
|
|
19
20
|
- {runner: ubuntu-latest, target: x86_64-unknown-linux-musl, manylinux: musllinux_1_2}
|
|
20
21
|
- {runner: ubuntu-latest, target: aarch64-unknown-linux-musl, manylinux: musllinux_1_2}
|
|
21
22
|
- {runner: macos-latest, target: x86_64, manylinux: ""}
|
|
@@ -46,6 +47,7 @@ jobs:
|
|
|
46
47
|
with:
|
|
47
48
|
target: ${{ matrix.target }}
|
|
48
49
|
manylinux: ${{ matrix.manylinux }}
|
|
50
|
+
docker-options: ${{ matrix.docker-options }}
|
|
49
51
|
args: --release --out dist
|
|
50
52
|
|
|
51
53
|
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
@@ -17,11 +17,15 @@ runs:
|
|
|
17
17
|
with:
|
|
18
18
|
python-version: ${{ inputs.python-version }}
|
|
19
19
|
enable-cache: true
|
|
20
|
+
# Only main saves caches, as each pull request would save its own copy.
|
|
21
|
+
save-cache: ${{ github.ref == 'refs/heads/main' }}
|
|
20
22
|
|
|
21
23
|
# The Rust toolchain of the runner builds unref, whose build is cached.
|
|
22
24
|
- name: Rust cache
|
|
23
25
|
if: inputs.install-project == 'true'
|
|
24
26
|
uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
|
27
|
+
with:
|
|
28
|
+
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
25
29
|
|
|
26
30
|
- name: Install Python dependencies
|
|
27
31
|
shell: bash
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
- id: unref
|
|
2
2
|
name: unref
|
|
3
|
-
description:
|
|
3
|
+
description: An extremely fast Python dead code finder, written in Rust.
|
|
4
4
|
entry: unref
|
|
5
5
|
# The hook is built from the source of the repository with Cargo, which pre-commit and prek install if
|
|
6
6
|
# it is missing.
|
|
@@ -136,6 +136,16 @@ dependencies = [
|
|
|
136
136
|
"rustversion",
|
|
137
137
|
]
|
|
138
138
|
|
|
139
|
+
[[package]]
|
|
140
|
+
name = "cc"
|
|
141
|
+
version = "1.11.2"
|
|
142
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
143
|
+
checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45"
|
|
144
|
+
dependencies = [
|
|
145
|
+
"find-msvc-tools",
|
|
146
|
+
"shlex",
|
|
147
|
+
]
|
|
148
|
+
|
|
139
149
|
[[package]]
|
|
140
150
|
name = "cfg-if"
|
|
141
151
|
version = "1.0.5"
|
|
@@ -319,6 +329,12 @@ version = "2.5.0"
|
|
|
319
329
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
320
330
|
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
|
321
331
|
|
|
332
|
+
[[package]]
|
|
333
|
+
name = "find-msvc-tools"
|
|
334
|
+
version = "0.1.15"
|
|
335
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
336
|
+
checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
|
|
337
|
+
|
|
322
338
|
[[package]]
|
|
323
339
|
name = "get-size-derive2"
|
|
324
340
|
version = "0.11.1"
|
|
@@ -440,6 +456,15 @@ version = "0.2.191"
|
|
|
440
456
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
441
457
|
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
|
442
458
|
|
|
459
|
+
[[package]]
|
|
460
|
+
name = "libmimalloc-sys"
|
|
461
|
+
version = "0.1.49"
|
|
462
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
463
|
+
checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9"
|
|
464
|
+
dependencies = [
|
|
465
|
+
"cc",
|
|
466
|
+
]
|
|
467
|
+
|
|
443
468
|
[[package]]
|
|
444
469
|
name = "log"
|
|
445
470
|
version = "0.4.35"
|
|
@@ -475,6 +500,15 @@ version = "2.8.3"
|
|
|
475
500
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
476
501
|
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
477
502
|
|
|
503
|
+
[[package]]
|
|
504
|
+
name = "mimalloc"
|
|
505
|
+
version = "0.1.52"
|
|
506
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
507
|
+
checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862"
|
|
508
|
+
dependencies = [
|
|
509
|
+
"libmimalloc-sys",
|
|
510
|
+
]
|
|
511
|
+
|
|
478
512
|
[[package]]
|
|
479
513
|
name = "multiversion_no_op"
|
|
480
514
|
version = "1.0.0"
|
|
@@ -804,6 +838,12 @@ dependencies = [
|
|
|
804
838
|
"serde_core",
|
|
805
839
|
]
|
|
806
840
|
|
|
841
|
+
[[package]]
|
|
842
|
+
name = "shlex"
|
|
843
|
+
version = "2.0.1"
|
|
844
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
845
|
+
checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
|
|
846
|
+
|
|
807
847
|
[[package]]
|
|
808
848
|
name = "simdutf8"
|
|
809
849
|
version = "0.1.5"
|
|
@@ -882,6 +922,26 @@ dependencies = [
|
|
|
882
922
|
"syn 3.0.10",
|
|
883
923
|
]
|
|
884
924
|
|
|
925
|
+
[[package]]
|
|
926
|
+
name = "tikv-jemalloc-sys"
|
|
927
|
+
version = "0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
|
|
928
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
929
|
+
checksum = "cd8aa5b2ab86a2cefa406d889139c162cbb230092f7d1d7cbc1716405d852a3b"
|
|
930
|
+
dependencies = [
|
|
931
|
+
"cc",
|
|
932
|
+
"libc",
|
|
933
|
+
]
|
|
934
|
+
|
|
935
|
+
[[package]]
|
|
936
|
+
name = "tikv-jemallocator"
|
|
937
|
+
version = "0.6.1"
|
|
938
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
939
|
+
checksum = "0359b4327f954e0567e69fb191cf1436617748813819c94b8cd4a431422d053a"
|
|
940
|
+
dependencies = [
|
|
941
|
+
"libc",
|
|
942
|
+
"tikv-jemalloc-sys",
|
|
943
|
+
]
|
|
944
|
+
|
|
885
945
|
[[package]]
|
|
886
946
|
name = "tinyvec"
|
|
887
947
|
version = "1.13.3"
|
|
@@ -944,12 +1004,13 @@ dependencies = [
|
|
|
944
1004
|
|
|
945
1005
|
[[package]]
|
|
946
1006
|
name = "unref"
|
|
947
|
-
version = "0.
|
|
1007
|
+
version = "0.3.0"
|
|
948
1008
|
dependencies = [
|
|
949
1009
|
"clap",
|
|
950
1010
|
"encoding_rs",
|
|
951
1011
|
"fancy-regex",
|
|
952
1012
|
"ignore",
|
|
1013
|
+
"mimalloc",
|
|
953
1014
|
"rayon",
|
|
954
1015
|
"regex",
|
|
955
1016
|
"ruff_python_ast",
|
|
@@ -957,6 +1018,7 @@ dependencies = [
|
|
|
957
1018
|
"ruff_source_file",
|
|
958
1019
|
"ruff_text_size",
|
|
959
1020
|
"rustc-hash",
|
|
1021
|
+
"tikv-jemallocator",
|
|
960
1022
|
"toml",
|
|
961
1023
|
]
|
|
962
1024
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "unref"
|
|
3
3
|
# The release workflow sets the version from the tag that it releases.
|
|
4
|
-
version = "0.
|
|
4
|
+
version = "0.3.0"
|
|
5
5
|
edition = "2024"
|
|
6
6
|
rust-version = "1.97"
|
|
7
|
-
description = "
|
|
7
|
+
description = "An extremely fast Python dead code finder, written in Rust."
|
|
8
8
|
license = "MIT"
|
|
9
9
|
repository = "https://github.com/Apakottur/unref"
|
|
10
10
|
readme = "README.md"
|
|
@@ -26,6 +26,16 @@ ruff_python_parser = { git = "https://github.com/astral-sh/ruff", tag = "0.17.5"
|
|
|
26
26
|
ruff_source_file = { git = "https://github.com/astral-sh/ruff", tag = "0.17.5" }
|
|
27
27
|
ruff_text_size = { git = "https://github.com/astral-sh/ruff", tag = "0.17.5" }
|
|
28
28
|
|
|
29
|
+
# mimalloc v2, as v3 holds about a third more memory when many threads check. It does not build with the old GCC of
|
|
30
|
+
# the manylinux 2.17 image of aarch64 Linux, which uses jemalloc as ruff's.
|
|
31
|
+
[target.'cfg(not(all(target_os = "linux", target_arch = "aarch64", target_env = "gnu")))'.dependencies]
|
|
32
|
+
mimalloc = { version = "0.1.52", default-features = false, features = ["v2"] }
|
|
33
|
+
|
|
34
|
+
[target.'cfg(all(target_os = "linux", target_arch = "aarch64", target_env = "gnu"))'.dependencies]
|
|
35
|
+
tikv-jemallocator = { version = "0.6.0", default-features = false, features = [
|
|
36
|
+
"background_threads_runtime_support",
|
|
37
|
+
] }
|
|
38
|
+
|
|
29
39
|
# As ruff's.
|
|
30
40
|
[profile.release]
|
|
31
41
|
lto = "fat"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: unref
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.15
|
|
14
14
|
Classifier: Programming Language :: Rust
|
|
15
15
|
License-File: LICENSE
|
|
16
|
-
Summary:
|
|
16
|
+
Summary: An extremely fast Python dead code finder, written in Rust.
|
|
17
17
|
Keywords: dead-code,unused-code,linter,static-analysis
|
|
18
18
|
Author: Yossi Rozantsev
|
|
19
19
|
License-Expression: MIT
|
|
@@ -43,14 +43,12 @@ An extremely fast Python dead code finder, written in Rust.
|
|
|
43
43
|
|
|
44
44
|
- **Fast**: 20x faster than [vulture](https://github.com/jendrikseipp/vulture), it checks all of CPython's Python code in
|
|
45
45
|
under a second.
|
|
46
|
-
- **Just works**: built-in rules for pytest, Pydantic, SQLAlchemy and
|
|
46
|
+
- **Just works**: built-in rules for pytest, Django, Flask, Pydantic, SQLAlchemy and
|
|
47
47
|
[more](https://unref.readthedocs.io/en/latest/configuration/#frameworks), so most projects need little or no
|
|
48
48
|
configuration.
|
|
49
|
-
- **
|
|
50
|
-
|
|
51
|
-
- **
|
|
52
|
-
finds the unused code Ruff leaves out.
|
|
53
|
-
- **Modern**: ty-style rule codes, configuration in `pyproject.toml`, built on Ruff's parser.
|
|
49
|
+
- **Flexible**: works for applications and libraries alike, see
|
|
50
|
+
[what counts as dead code](https://unref.readthedocs.io/en/latest/faq/#what-counts-as-dead-code).
|
|
51
|
+
- **Modern**: follows the conventions of [Ruff](https://docs.astral.sh/ruff/) and [ty](https://docs.astral.sh/ty/).
|
|
54
52
|
- **Fits your workflow**: runs with `uvx`, as a pre-commit or prek hook, and in GitHub Actions.
|
|
55
53
|
|
|
56
54
|
**Documentation**: [unref.readthedocs.io](https://unref.readthedocs.io/)
|
|
@@ -18,14 +18,12 @@ An extremely fast Python dead code finder, written in Rust.
|
|
|
18
18
|
|
|
19
19
|
- **Fast**: 20x faster than [vulture](https://github.com/jendrikseipp/vulture), it checks all of CPython's Python code in
|
|
20
20
|
under a second.
|
|
21
|
-
- **Just works**: built-in rules for pytest, Pydantic, SQLAlchemy and
|
|
21
|
+
- **Just works**: built-in rules for pytest, Django, Flask, Pydantic, SQLAlchemy and
|
|
22
22
|
[more](https://unref.readthedocs.io/en/latest/configuration/#frameworks), so most projects need little or no
|
|
23
23
|
configuration.
|
|
24
|
-
- **
|
|
25
|
-
|
|
26
|
-
- **
|
|
27
|
-
finds the unused code Ruff leaves out.
|
|
28
|
-
- **Modern**: ty-style rule codes, configuration in `pyproject.toml`, built on Ruff's parser.
|
|
24
|
+
- **Flexible**: works for applications and libraries alike, see
|
|
25
|
+
[what counts as dead code](https://unref.readthedocs.io/en/latest/faq/#what-counts-as-dead-code).
|
|
26
|
+
- **Modern**: follows the conventions of [Ruff](https://docs.astral.sh/ruff/) and [ty](https://docs.astral.sh/ty/).
|
|
29
27
|
- **Fits your workflow**: runs with `uvx`, as a pre-commit or prek hook, and in GitHub Actions.
|
|
30
28
|
|
|
31
29
|
**Documentation**: [unref.readthedocs.io](https://unref.readthedocs.io/)
|
|
@@ -159,7 +159,8 @@ Enabled by default: yes.
|
|
|
159
159
|
|
|
160
160
|
- Functions and methods with a route, error or request decorator, such as `app.route` or
|
|
161
161
|
`bp.errorhandler`, of `Flask()` or `Blueprint()`, or an instance of a subclass, set at module level or
|
|
162
|
-
in the same function, of a module-level variable set to what a
|
|
162
|
+
in the same function, of a parameter annotated as one, of a module-level variable set to what a
|
|
163
|
+
factory makes, or of `current_app`.
|
|
163
164
|
- Commands of `cli.command` and `cli.group` of these, and of `command` and `group` of an `AppGroup()`
|
|
164
165
|
or of such a group.
|
|
165
166
|
- Module-level `create_app` and `make_app` functions that make a `Flask()`, and module-level `app` and
|
|
@@ -191,6 +192,8 @@ Enabled by default: yes.
|
|
|
191
192
|
- In modules that `include("...")` names: `urlpatterns` and `app_name`.
|
|
192
193
|
- Module-level variables set to `get_wsgi_application()` or `get_asgi_application()`.
|
|
193
194
|
- Subclasses of `AppConfig`, with their `ready` method and attributes such as `name`.
|
|
195
|
+
- Subclasses of `Migration` named `Migration`, with their attributes such as `operations` and
|
|
196
|
+
`dependencies`.
|
|
194
197
|
|
|
195
198
|
The settings modules are those that `os.environ.setdefault("DJANGO_SETTINGS_MODULE", ...)` names, those
|
|
196
199
|
that `settings` names, and the modules they star import. A table turns the rules on:
|
|
@@ -200,6 +203,14 @@ that `settings` names, and the modules they star import. A table turns the rules
|
|
|
200
203
|
settings = ["config/settings/production.py"]
|
|
201
204
|
```
|
|
202
205
|
|
|
206
|
+
#### `celery`
|
|
207
|
+
|
|
208
|
+
Enabled by default: yes.
|
|
209
|
+
|
|
210
|
+
- Tasks of `shared_task`, and of the `task` decorator of `Celery()`, or an instance of a subclass, set
|
|
211
|
+
at module level or in the same function, of a parameter annotated as one, or of `current_app`.
|
|
212
|
+
- In subclasses of `Task`: `run` and handlers such as `on_failure`.
|
|
213
|
+
|
|
203
214
|
### `output-format`
|
|
204
215
|
|
|
205
216
|
How the findings are printed, as [Ruff's option](https://docs.astral.sh/ruff/settings/#output-format).
|
unref-0.3.0/docs/faq.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# FAQ
|
|
2
|
+
|
|
3
|
+
## What counts as dead code?
|
|
4
|
+
|
|
5
|
+
A definition is unused when no entry point of the project reaches it. The entry points are:
|
|
6
|
+
|
|
7
|
+
- The code at the top level of every checked file, including tests and scripts.
|
|
8
|
+
- The [entry points](configuration.md#entry-points) in `pyproject.toml`.
|
|
9
|
+
- What the [frameworks](configuration.md#frameworks) call by themselves, such as pytest's tests.
|
|
10
|
+
- The names in [`used-names`](configuration.md#used-names) and the decorators in
|
|
11
|
+
[`used-decorators`](configuration.md#used-decorators).
|
|
12
|
+
- The names in the `__all__` of a module.
|
|
13
|
+
|
|
14
|
+
What an entry point uses is used, and so is what that uses, and so on. Anything else is unused, even if
|
|
15
|
+
other unused code references it.
|
|
16
|
+
|
|
17
|
+
## How do I check a library?
|
|
18
|
+
|
|
19
|
+
A library is used by code outside the project, so its public API is unused unless the project uses it,
|
|
20
|
+
such as in its tests. List the public API in `__all__`, or in [`used-names`](configuration.md#used-names):
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
__all__ = ["parse", "Parser"]
|
|
24
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# unref
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<em>An extremely fast Python dead code finder, written in Rust.</em>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://pypi.python.org/pypi/unref"><img alt="PyPI" src="https://img.shields.io/pypi/v/unref.svg"></a>
|
|
9
|
+
<a href="https://github.com/Apakottur/unref/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/pypi/l/unref.svg"></a>
|
|
10
|
+
<a href="https://pypi.python.org/pypi/unref"><img alt="Python versions" src="https://img.shields.io/pypi/pyversions/unref.svg"></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
**Documentation**: [unref.readthedocs.io](https://unref.readthedocs.io/)
|
|
16
|
+
|
|
17
|
+
**Source Code**: [github.com/Apakottur/unref](https://github.com/Apakottur/unref)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Introduction
|
|
22
|
+
|
|
23
|
+
`unref` finds the functions, classes, methods, variables and attributes that nothing in a Python project
|
|
24
|
+
uses. Unused code piles up in every codebase, faster than ever now that AI tools write much of it, and
|
|
25
|
+
[Ruff](https://docs.astral.sh/ruff/) does not find it yet, see
|
|
26
|
+
[astral-sh/ruff#872](https://github.com/astral-sh/ruff/issues/872). The name is short for "unreferenced".
|
|
27
|
+
|
|
28
|
+
- **Fast**: 20x faster than [vulture](https://github.com/jendrikseipp/vulture), it checks all of CPython's Python
|
|
29
|
+
code in under a second.
|
|
30
|
+
- **Just works**: built-in rules for pytest, Django, Flask, Pydantic, SQLAlchemy and
|
|
31
|
+
[more](configuration.md#frameworks), so most projects need little or no configuration.
|
|
32
|
+
- **Flexible**: works for applications and libraries alike, see
|
|
33
|
+
[what counts as dead code](faq.md#what-counts-as-dead-code).
|
|
34
|
+
- **Modern**: follows the conventions of [Ruff](https://docs.astral.sh/ruff/) and [ty](https://docs.astral.sh/ty/).
|
|
35
|
+
- **Fits your workflow**: runs with `uvx`, as a pre-commit or prek hook, and in GitHub Actions.
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<img alt="Time to check CPython with unref and other dead code finders" src="https://raw.githubusercontent.com/Apakottur/unref/main/assets/benchmark.svg">
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
## Example
|
|
42
|
+
|
|
43
|
+
```shell
|
|
44
|
+
$ uvx unref
|
|
45
|
+
src/project/models.py:12:7: unused-class 'Account'
|
|
46
|
+
src/project/utils.py:40:5: unused-function 'parse_date'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
See [usage](usage.md) for the command line, pre-commit and prek, and GitHub Actions.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Usage
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Quick start
|
|
3
|
+
## Command line
|
|
6
4
|
|
|
7
5
|
Run it with [`uvx`](https://docs.astral.sh/uv/):
|
|
8
6
|
|
|
@@ -12,8 +10,20 @@ src/project/models.py:12:7: unused-class 'Account'
|
|
|
12
10
|
src/project/utils.py:40:5: unused-function 'parse_date'
|
|
13
11
|
```
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
`unref` checks the project that the current directory is in, or only the files and directories it is given:
|
|
14
|
+
|
|
15
|
+
```shell
|
|
16
|
+
uvx unref src scripts
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`unref` exits with a non-zero status if anything is found. See the [rules](rules.md) for what it reports
|
|
20
|
+
and how to ignore a finding, and the [command line](configuration.md#command-line) for its options.
|
|
21
|
+
|
|
22
|
+
## pre-commit and prek
|
|
23
|
+
|
|
24
|
+
As a [pre-commit](https://pre-commit.com/) or [prek](https://prek.j178.dev/) hook, alongside
|
|
25
|
+
[Ruff](https://docs.astral.sh/ruff/), which covers the unused imports and local variables that `unref`
|
|
26
|
+
leaves out:
|
|
17
27
|
|
|
18
28
|
```yaml
|
|
19
29
|
repos:
|
|
@@ -28,31 +38,13 @@ repos:
|
|
|
28
38
|
- id: unref
|
|
29
39
|
```
|
|
30
40
|
|
|
31
|
-
## Usage
|
|
32
|
-
|
|
33
|
-
### Command line
|
|
34
|
-
|
|
35
|
-
`unref` checks the project that the current directory is in, or only the files and directories it is given:
|
|
36
|
-
|
|
37
|
-
```shell
|
|
38
|
-
uvx unref src scripts
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
`unref` exits with a non-zero status if anything is found. See the [rules](rules.md) for what it reports
|
|
42
|
-
and how to ignore a finding, and the [command line](configuration.md#command-line) for its options.
|
|
43
|
-
|
|
44
|
-
### pre-commit and prek
|
|
45
|
-
|
|
46
|
-
The hook in the [quick start](#quick-start) runs next to Ruff, which covers the unused imports and local
|
|
47
|
-
variables that `unref` leaves out.
|
|
48
|
-
|
|
49
41
|
Set `rev` to the [latest release](https://github.com/Apakottur/unref/releases), or let `pre-commit autoupdate`
|
|
50
42
|
or `prek autoupdate` fill it in.
|
|
51
43
|
|
|
52
44
|
The hook checks the whole project, not only the changed files: a definition is unused only if no file
|
|
53
45
|
references it.
|
|
54
46
|
|
|
55
|
-
|
|
47
|
+
## GitHub Actions
|
|
56
48
|
|
|
57
49
|
With `--output-format github`, the findings show as annotations on the files of a pull request:
|
|
58
50
|
|
|
@@ -66,20 +58,3 @@ jobs:
|
|
|
66
58
|
- run: uv sync # Optional: lets unref follow base classes from the dependencies, see `python`.
|
|
67
59
|
- run: uvx unref --output-format github
|
|
68
60
|
```
|
|
69
|
-
|
|
70
|
-
## Why
|
|
71
|
-
|
|
72
|
-
Unused code piles up in every codebase, faster than ever now that AI tools write much of it.
|
|
73
|
-
|
|
74
|
-
[Ruff](https://docs.astral.sh/ruff/) does not find unused code yet, see
|
|
75
|
-
[astral-sh/ruff#872](https://github.com/astral-sh/ruff/issues/872). `unref` fills that gap until it does:
|
|
76
|
-
|
|
77
|
-
- **Just works**: built-in rules for [many frameworks](configuration.md#frameworks), so most projects need
|
|
78
|
-
little or no configuration.
|
|
79
|
-
- **Accurate**: names are matched by module, so a used `parse` in one module does not hide an unused `parse`
|
|
80
|
-
in another.
|
|
81
|
-
- **Ruff-style**: same conventions, options and output style, ty-style rule codes and configuration in
|
|
82
|
-
`pyproject.toml`.
|
|
83
|
-
- **Fast**: written in Rust on Ruff's parser, it checks all of CPython's Python code in under a second.
|
|
84
|
-
|
|
85
|
-
The name is short for "unreferenced".
|
|
@@ -39,6 +39,8 @@ ignorelist
|
|
|
39
39
|
isenabled
|
|
40
40
|
isort
|
|
41
41
|
isupper
|
|
42
|
+
jemalloc
|
|
43
|
+
jemallocator
|
|
42
44
|
kwonlyargs
|
|
43
45
|
longpaths
|
|
44
46
|
lucide
|
|
@@ -49,6 +51,7 @@ maxfail
|
|
|
49
51
|
metaclass
|
|
50
52
|
metaclasses
|
|
51
53
|
metafunc
|
|
54
|
+
mimalloc
|
|
52
55
|
mkdocstrings
|
|
53
56
|
modifyitems
|
|
54
57
|
musllinux
|
|
@@ -78,6 +81,7 @@ rfind
|
|
|
78
81
|
Rozantsev
|
|
79
82
|
rsplit
|
|
80
83
|
rustc
|
|
84
|
+
saleor
|
|
81
85
|
sdist
|
|
82
86
|
setdefault
|
|
83
87
|
showlocals
|
|
@@ -92,6 +96,7 @@ subclassing
|
|
|
92
96
|
Swatinem
|
|
93
97
|
taplo
|
|
94
98
|
Tarjan
|
|
99
|
+
tikv
|
|
95
100
|
typer
|
|
96
101
|
typeshed
|
|
97
102
|
unref
|
|
@@ -21,7 +21,7 @@ docs = [
|
|
|
21
21
|
[project]
|
|
22
22
|
name = "unref"
|
|
23
23
|
dynamic = ["version"]
|
|
24
|
-
description = "
|
|
24
|
+
description = "An extremely fast Python dead code finder, written in Rust."
|
|
25
25
|
authors = [{ name = "Yossi Rozantsev" }]
|
|
26
26
|
license = "MIT"
|
|
27
27
|
readme = "README.md"
|