# mypy configuration for this repository. # # The repository is designed to check out and run its gates with only the standard library plus # pytest (see pytest.ini and .github/workflows/ci.yml): frida, capstone, tiktoken and PyYAML are # optional runtime dependencies that scripts import lazily or behind try/except, with documented # fallbacks. Do not require them -- or their stubs -- to be installed for # `mypy *.py skills/apk-reverse/scripts/*.py` to pass. When they *are* installed and typed # (e.g. types-PyYAML), mypy still uses the real stubs; these overrides only apply where the module is # missing or untyped. # # When installed, capstone ships no py.typed marker; frida and tiktoken are host-side extras. # Everything else in the tree is analyzed normally, including every gate script -- which is the point: # check_repo/check_refs/check_budget/check_routing/check_commands carry the behaviour of the whole # repository, so they are worth type-checking rather than excluding. # # Enforced in CI: the `lint` job in .github/workflows/ci.yml runs mypy with exactly this # configuration, on a bare interpreter (no frida/capstone/tiktoken/PyYAML installed), so the # overrides below are exercised rather than skipped. # # Verified locally on 2022-09-22 baseline; re-verified 2026-10-20 after the target bump below: # `mypy` over 64 files reports no issues with the overrides in place, on an interpreter that # also has yaml/frida installed (the ignore comments in check_repo.py and # spawn_patch_detach.py keep both the installed and bare-machine sides clean). [mypy] # 3.10, not 3.9: mypy releases from 2025 on dropped `python_version = 3.9` as a supported # target and warn on every run. The honest cost: under a 3.10 target mypy stops rejecting # 3.10-only syntax (match statements, runtime `X | Y`), so the SKILL.md "Python 3.9+" # claim is no longer statically guarded -- nothing in the tree uses such syntax, and CI's # oldest actually-executed interpreter is 3.11 (see ci.yml), which is the check that would # catch a real 3.9 break at test time. python_version = 3.10 warn_unused_ignores = False [mypy-frida] ignore_missing_imports = True [mypy-frida.*] ignore_missing_imports = True [mypy-capstone] ignore_missing_imports = True [mypy-capstone.*] ignore_missing_imports = True [mypy-tiktoken] ignore_missing_imports = True [mypy-tiktoken.*] ignore_missing_imports = True [mypy-yaml] ignore_missing_imports = True [mypy-yaml.*] ignore_missing_imports = True