gyomu-python-analysis 0.3.0__tar.gz → 0.4.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.
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/PKG-INFO +2 -1
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/pyproject.toml +1 -0
- gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/call.py +67 -0
- gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/comprehension.py +40 -0
- gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/for.py +63 -0
- gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/function.py +22 -0
- gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/if.py +40 -0
- gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/match.py +60 -0
- gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/try.py +41 -0
- gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/with.py +35 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/classes.py +4 -2
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/functions.py +2 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/types.py +3 -1
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/helpers.py +119 -183
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/analyzers/ast/statement.py +1423 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/analyzers/ast/symbol.py +90 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/cls.py +91 -4
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/analyzers/context.py +139 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/decorator.py +65 -10
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/dependency.py +58 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/docstring.py +65 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/expression/expr.py +57 -5
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/functions.py +41 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/imports.py +10 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/internal/common.py +6 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/internal/location.py +11 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/internal/visibility.py +15 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/pydantic.py +39 -3
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/type_alias.py +13 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/types.py +15 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/variables.py +11 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/delete_cache.py +38 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/extract/symbols.py +73 -3
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/file/source_file_context.py +7 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/get_module.py +25 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/initialize.py +17 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/load.py +18 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/load_file_context.py +12 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/load_module.py +43 -5
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/metadata.py +27 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/parser/docstring.py +2 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/workspace.py +66 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/error/analysis.py +2 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/path/conversion.py +11 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/project/context.py +120 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/project/workspace.py +77 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/snapshot/analyze.py +81 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/snapshot/commit.py +84 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/snapshot/create.py +112 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/snapshot/diff.py +60 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/snapshot/models.py +103 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/snapshot/project.py +91 -0
- gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/snapshot/types.py +2 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/conftest.py +14 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/helper.py +38 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_call.py +305 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_comprehension.py +499 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_conversion.py +138 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_dependency.py +69 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_for.py +291 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_function.py +320 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_if.py +385 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_match.py +575 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_statement.py +338 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_try.py +444 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast/test_with.py +360 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/expression/__init__.py +0 -0
- gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/internal/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_classes.py +11 -13
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_functions.py +9 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_types.py +14 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/test_get_module.py +1 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/test_initialize.py +65 -7
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/test_load_file.py +1 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/test_load_module.py +24 -10
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/test_metadata.py +2 -0
- gyomu_python_analysis-0.4.0/tests/unit/path/__init__.py +0 -0
- gyomu_python_analysis-0.4.0/tests/unit/project/test_config.py +72 -0
- gyomu_python_analysis-0.4.0/tests/unit/snapshot/__init__.py +0 -0
- gyomu_python_analysis-0.4.0/tests/unit/snapshot/test_analyze.py +319 -0
- gyomu_python_analysis-0.4.0/tests/unit/snapshot/test_commit.py +332 -0
- gyomu_python_analysis-0.4.0/tests/unit/snapshot/test_create.py +168 -0
- gyomu_python_analysis-0.4.0/tests/unit/snapshot/test_diff.py +158 -0
- gyomu_python_analysis-0.4.0/tests/unit/snapshot/test_project.py +96 -0
- gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/analysis/analyzers/context.py +0 -66
- gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/analysis/analyzers/expression/name.py +0 -38
- gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/project/context.py +0 -33
- gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/project/workspace.py +0 -41
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/.gitignore +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/README.md +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/experiments/griffe_analysis.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/experiments/griffe_dump.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/experiments/sample/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/experiments/sample/user.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/experiments/sample.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/pyproject.toml +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/01-simple.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/02-args.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/03-typed-return.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/04-raises.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/05-examples.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/06-notes.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/07-complex.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/08-gyomu-context.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/09-custom-section.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/10-edge-cases.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/11-custom-and-gyomu-context.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/12-module.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/13-class.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/14-variable.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/15-custom-list-section.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/docstring/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/import/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/import/all.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/import/all2.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/import/imports.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/import/relative.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/shared.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/call.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/callable.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/decorator.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/generics.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/location.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/pydantic.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/type_alias.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/symbol/variable.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/types/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/fixtures/src/analysis/types/name.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/monorepo_fixtures/packages/project_a/pyproject.toml +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/monorepo_fixtures/packages/project_a/src/project_a/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/monorepo_fixtures/packages/project_a/src/project_a/module.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/monorepo_fixtures/packages/project_b/pyproject.toml +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/monorepo_fixtures/packages/project_b/src/project_b/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/monorepo_fixtures/packages/project_b/src/project_b/module.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/python_analysis_test_support/monorepo_fixtures/pyproject.toml +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/roadmap.md +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/src/gyomu_python_analysis/analysis/analyzers/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/analysis/analyzers/expression → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/analyzers/ast}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/analysis/analyzers/internal → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/analyzers/expression}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/analysis/extract → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/analyzers/internal}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/analysis/file → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/extract}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/analysis/parser → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/file}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/error → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/analysis/parser}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/path → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/error}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/src/gyomu_python_analysis/project → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/path}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/tests/unit → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/project}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/tests/unit/analysis → gyomu_python_analysis-0.4.0/src/gyomu_python_analysis/snapshot}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/tests/unit/analysis/analyzers → gyomu_python_analysis-0.4.0/tests/unit}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/tests/unit/analysis/analyzers/expression → gyomu_python_analysis-0.4.0/tests/unit/analysis}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/tests/unit/analysis/analyzers/internal → gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0/tests/unit/path → gyomu_python_analysis-0.4.0/tests/unit/analysis/analyzers/ast}/__init__.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/expression/test_analyze_expression_name.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/internal/test_location.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/internal/test_visibility.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_decorator.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_dependency.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_docstring.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_imports.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_pydantic.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_type_alias.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_analyze_variable.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/analyzers/test_context.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/test_load.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/analysis/test_workspace.py +0 -0
- {gyomu_python_analysis-0.3.0 → gyomu_python_analysis-0.4.0}/tests/unit/path/test_conversion.py +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gyomu-python-analysis
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Gyomu Python Analysis
|
|
5
5
|
Requires-Python: >=3.13
|
|
6
6
|
Requires-Dist: docstring-parser>=0.18.0
|
|
7
7
|
Requires-Dist: griffelib>=2.2.0
|
|
8
8
|
Requires-Dist: gyomu-infra
|
|
9
9
|
Requires-Dist: gyomu-schema
|
|
10
|
+
Requires-Dist: pydantic
|
|
10
11
|
Requires-Dist: returns
|
|
11
12
|
Description-Content-Type: text/markdown
|
|
12
13
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def combine(*values: Any, **options: Any) -> Any:
|
|
7
|
+
return values, options
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def convert(value: int) -> str:
|
|
11
|
+
return str(value)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def create_value(value: int) -> str:
|
|
15
|
+
return str(value)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def build_option(value: int = 0) -> dict[str, int]:
|
|
19
|
+
return {"value": value}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Service:
|
|
23
|
+
def execute(self, *args: Any, **kwargs: Any) -> Any:
|
|
24
|
+
return args, kwargs
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
service = Service()
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def simple_call(value: int) -> str:
|
|
31
|
+
return convert(value)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def positional_call(value: int) -> Any:
|
|
35
|
+
return combine(value, convert(value))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def keyword_call(value: int) -> Any:
|
|
39
|
+
return combine(value, prefix="value", suffix="!")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def attribute_call(value: int) -> Any:
|
|
43
|
+
return service.execute(value)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def nested_call(value: int) -> Any:
|
|
47
|
+
return service.execute(
|
|
48
|
+
create_value(value),
|
|
49
|
+
option=build_option(value),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def starred_call(values: list[int]) -> Any:
|
|
54
|
+
return combine(*values)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def double_starred_call(options: dict[str, Any]) -> Any:
|
|
58
|
+
return combine(**options)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def complex_call(value: int, values: list[int]) -> Any:
|
|
62
|
+
return service.execute(
|
|
63
|
+
convert(value),
|
|
64
|
+
*values,
|
|
65
|
+
option=build_option(value),
|
|
66
|
+
**{"value": value},
|
|
67
|
+
)
|
gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/comprehension.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
def list_comprehension(values: list[int]) -> list[int]:
|
|
2
|
+
return [value * 2 for value in values]
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def list_comprehension_with_if(values: list[int]) -> list[int]:
|
|
6
|
+
return [value * 2 for value in values if value > 0]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def list_comprehension_multiple_for(
|
|
10
|
+
values: list[list[int]],
|
|
11
|
+
) -> list[int]:
|
|
12
|
+
return [value for items in values for value in items]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def set_comprehension(values: list[int]) -> set[int]:
|
|
16
|
+
return {value * 2 for value in values}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def set_comprehension_with_if(values: list[int]) -> set[int]:
|
|
20
|
+
return {value * 2 for value in values if value > 0}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def dict_comprehension(values: list[int]) -> dict[int, int]:
|
|
24
|
+
return {value: value * 2 for value in values}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def dict_comprehension_with_if(values: list[int]) -> dict[int, int]:
|
|
28
|
+
return {value: value * 2 for value in values if value > 0}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def generator_expression(values: list[int]):
|
|
32
|
+
return (value * 2 for value in values)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def generator_expression_with_if(values: list[int]):
|
|
36
|
+
return (value * 2 for value in values if value > 0)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def nested_comprehension(values: list[list[int]]) -> list[int]:
|
|
40
|
+
return [value * 2 for items in values for value in items if value > 0]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from collections.abc import AsyncIterator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def simple_for(values: list[int]) -> int:
|
|
5
|
+
total = 0
|
|
6
|
+
|
|
7
|
+
for value in values:
|
|
8
|
+
total += value
|
|
9
|
+
|
|
10
|
+
return total
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def for_with_else(values: list[int]) -> int:
|
|
14
|
+
total = 0
|
|
15
|
+
|
|
16
|
+
for value in values:
|
|
17
|
+
total += value
|
|
18
|
+
else:
|
|
19
|
+
total += 1
|
|
20
|
+
|
|
21
|
+
return total
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def for_with_break(values: list[int]) -> int:
|
|
25
|
+
total = 0
|
|
26
|
+
|
|
27
|
+
for value in values:
|
|
28
|
+
if value < 0:
|
|
29
|
+
break
|
|
30
|
+
total += value
|
|
31
|
+
|
|
32
|
+
return total
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def nested_for(values: list[list[int]]) -> int:
|
|
36
|
+
total = 0
|
|
37
|
+
|
|
38
|
+
for items in values:
|
|
39
|
+
for value in items:
|
|
40
|
+
total += value
|
|
41
|
+
|
|
42
|
+
return total
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class AsyncValues:
|
|
46
|
+
def __init__(self, values: list[int]) -> None:
|
|
47
|
+
self.values = values
|
|
48
|
+
|
|
49
|
+
def __aiter__(self) -> AsyncIterator[int]:
|
|
50
|
+
return self._iterate()
|
|
51
|
+
|
|
52
|
+
async def _iterate(self) -> AsyncIterator[int]:
|
|
53
|
+
for value in self.values:
|
|
54
|
+
yield value
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
async def async_for(values: AsyncValues) -> int:
|
|
58
|
+
total = 0
|
|
59
|
+
|
|
60
|
+
async for value in values:
|
|
61
|
+
total += value
|
|
62
|
+
|
|
63
|
+
return total
|
gyomu_python_analysis-0.4.0/python_analysis_test_support/fixtures/src/analysis/ast/function.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
def outer() -> None:
|
|
2
|
+
def inner(value: int) -> str:
|
|
3
|
+
return str(value)
|
|
4
|
+
|
|
5
|
+
result = inner(10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def outer_with_multiple_functions(value: int) -> int:
|
|
9
|
+
def add(left: int, right: int) -> int:
|
|
10
|
+
return left + right
|
|
11
|
+
|
|
12
|
+
def multiply(left: int, right: int) -> int:
|
|
13
|
+
return left * right
|
|
14
|
+
|
|
15
|
+
return add(value, 2) + multiply(value, 3)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def outer_with_async_function() -> None:
|
|
19
|
+
async def inner(value: int) -> str:
|
|
20
|
+
return str(value)
|
|
21
|
+
|
|
22
|
+
result = inner(10)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
def simple_if(value: int) -> str:
|
|
2
|
+
if value > 0:
|
|
3
|
+
return "positive"
|
|
4
|
+
return "non-positive"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def if_else(value: int) -> str:
|
|
8
|
+
if value > 0:
|
|
9
|
+
return "positive"
|
|
10
|
+
else:
|
|
11
|
+
return "non-positive"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def if_elif_else(value: int) -> str:
|
|
15
|
+
if value > 0:
|
|
16
|
+
return "positive"
|
|
17
|
+
elif value == 0:
|
|
18
|
+
return "zero"
|
|
19
|
+
else:
|
|
20
|
+
return "negative"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def nested_if(value: int, threshold: int) -> str:
|
|
24
|
+
if value > 0:
|
|
25
|
+
if value >= threshold:
|
|
26
|
+
return "large"
|
|
27
|
+
else:
|
|
28
|
+
return "small"
|
|
29
|
+
return "non-positive"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def if_with_multiple_statements(value: int) -> int:
|
|
33
|
+
result = 0
|
|
34
|
+
|
|
35
|
+
if value > 0:
|
|
36
|
+
result = value
|
|
37
|
+
result += 1
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
return result
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
def simple_match(value: int) -> str:
|
|
2
|
+
match value:
|
|
3
|
+
case 0:
|
|
4
|
+
return "zero"
|
|
5
|
+
case 1:
|
|
6
|
+
return "one"
|
|
7
|
+
case _:
|
|
8
|
+
return "other"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def match_with_guard(value: int) -> str:
|
|
12
|
+
match value:
|
|
13
|
+
case number if number > 0:
|
|
14
|
+
return "positive"
|
|
15
|
+
case number if number < 0:
|
|
16
|
+
return "negative"
|
|
17
|
+
case _:
|
|
18
|
+
return "zero"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def match_with_or_pattern(value: int) -> str:
|
|
22
|
+
match value:
|
|
23
|
+
case 0 | 1:
|
|
24
|
+
return "small"
|
|
25
|
+
case 2 | 3:
|
|
26
|
+
return "medium"
|
|
27
|
+
case _:
|
|
28
|
+
return "large"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def match_sequence(value: list[int]) -> str:
|
|
32
|
+
match value:
|
|
33
|
+
case []:
|
|
34
|
+
return "empty"
|
|
35
|
+
case [first]:
|
|
36
|
+
return f"one: {first}"
|
|
37
|
+
case [first, second]:
|
|
38
|
+
return f"two: {first}, {second}"
|
|
39
|
+
case _:
|
|
40
|
+
return "many"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def match_mapping(value: dict[str, int]) -> str:
|
|
44
|
+
match value:
|
|
45
|
+
case {"name": name, "age": age}:
|
|
46
|
+
return f"{name}: {age}"
|
|
47
|
+
case {"name": name}:
|
|
48
|
+
return str(name)
|
|
49
|
+
case _:
|
|
50
|
+
return "unknown"
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def match_class(value: object) -> str:
|
|
54
|
+
match value:
|
|
55
|
+
case int(number):
|
|
56
|
+
return f"int: {number}"
|
|
57
|
+
case str(text):
|
|
58
|
+
return f"str: {text}"
|
|
59
|
+
case _:
|
|
60
|
+
return "other"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
def simple_try(value: int) -> int:
|
|
2
|
+
try:
|
|
3
|
+
return int(value)
|
|
4
|
+
except ValueError:
|
|
5
|
+
return 0
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def try_except_as(value: str) -> int:
|
|
9
|
+
try:
|
|
10
|
+
return int(value)
|
|
11
|
+
except ValueError as error:
|
|
12
|
+
return 0
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def try_multiple_except(value: str) -> int:
|
|
16
|
+
try:
|
|
17
|
+
return int(value)
|
|
18
|
+
except ValueError:
|
|
19
|
+
return 0
|
|
20
|
+
except TypeError:
|
|
21
|
+
return -1
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def try_except_else(value: str) -> int:
|
|
25
|
+
try:
|
|
26
|
+
result = int(value)
|
|
27
|
+
except ValueError:
|
|
28
|
+
return 0
|
|
29
|
+
else:
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def try_except_finally(value: str) -> int:
|
|
34
|
+
try:
|
|
35
|
+
result = int(value)
|
|
36
|
+
except ValueError:
|
|
37
|
+
result = 0
|
|
38
|
+
finally:
|
|
39
|
+
result += 1
|
|
40
|
+
|
|
41
|
+
return result
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def simple_with(path: Path) -> str:
|
|
5
|
+
with path.open("r") as file:
|
|
6
|
+
return file.read()
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def with_as(path: Path) -> str:
|
|
10
|
+
with path.open("r") as file:
|
|
11
|
+
content = file.read()
|
|
12
|
+
return content
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def with_multiple(path1: Path, path2: Path) -> str:
|
|
16
|
+
with path1.open("r") as file1, path2.open("r") as file2:
|
|
17
|
+
return file1.read() + file2.read()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def with_without_as(path: Path) -> None:
|
|
21
|
+
with path.open("r"):
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def nested_with(path1: Path, path2: Path) -> str:
|
|
26
|
+
with path1.open("r") as file1:
|
|
27
|
+
with path2.open("r") as file2:
|
|
28
|
+
return file1.read() + file2.read()
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def with_multiple_statements(path: Path) -> str:
|
|
32
|
+
with path.open("r") as file:
|
|
33
|
+
content = file.read()
|
|
34
|
+
content = content.strip()
|
|
35
|
+
return content
|
|
@@ -61,14 +61,16 @@ class Nested:
|
|
|
61
61
|
def __init__(self, value: int) -> None:
|
|
62
62
|
self.parent_value = value
|
|
63
63
|
|
|
64
|
+
def abstract(self)->None:...
|
|
65
|
+
|
|
64
66
|
class Inner:
|
|
65
67
|
def __init__(self, value: int) -> None:
|
|
66
68
|
self.child_value = value
|
|
67
|
-
|
|
69
|
+
def abstract(self)->None:...
|
|
68
70
|
class InnerMost:
|
|
69
71
|
def __init__(self, value: int) -> None:
|
|
70
72
|
self.grandchild_value = value
|
|
71
|
-
|
|
73
|
+
def abstract(self)->None:...
|
|
72
74
|
|
|
73
75
|
class TypeAlias:
|
|
74
76
|
type UserId = int
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from collections.abc import Callable
|
|
1
|
+
from collections.abc import Callable, Mapping
|
|
2
2
|
from enum import Enum
|
|
3
3
|
from typing import Literal
|
|
4
4
|
|
|
@@ -35,3 +35,5 @@ value_tuple_nested3: tuple[tuple[int, ...], ...]
|
|
|
35
35
|
# Set
|
|
36
36
|
value_set: set[str]
|
|
37
37
|
value_set_nested: set[tuple[str, int]]
|
|
38
|
+
|
|
39
|
+
CONFIG_OPTIONS: Mapping[str, str] = {}
|