{"id":20969,"library":"autotyping","title":"autotyping","description":"A tool for auto-adding simple type annotations to Python code. Current version 24.9.0, released September 2024. Follows a semi-annual release cadence.","status":"active","version":"24.9.0","language":"python","source_language":"en","source_url":"https://github.com/JelleZijlstra/autotyping","tags":["type-annotations","linter","python-typing","automatic-typing"],"install":[{"cmd":"pip install autotyping","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used for parsing and transforming Python code","package":"libcst","optional":false},{"reason":"Used for type inference when --pyanalyze-report is specified","package":"pyanalyze","optional":true}],"imports":[{"note":"Main class for programmatic usage","symbol":"Autotyping","correct":"from autotyping import Autotyping"}],"quickstart":{"code":"# Basic usage on a single file\nimport subprocess\nsubprocess.run([\"autotyping\", \"my_file.py\"], check=True)\n\n# Or run as a module\n# python -m autotyping my_file.py\n","lang":"python","description":"Invoke autotyping via CLI or subprocess. The tool adds type annotations to functions and methods based on common patterns."},"warnings":[{"fix":"Update Python to 3.8 or later and upgrade autotyping to 24.3.0+.","message":"Version 24.3.0 dropped support for Python 3.7. Upgrade to Python 3.8+.","severity":"breaking","affected_versions":"<=23.3.0"},{"fix":"Remove arguments after --safe or --aggressive. Use --safe on its own.","message":"The --safe and --aggressive flags in version 23.2.0 were changed to not take ignored arguments. Previously they accepted --safe=true, now just --safe.","severity":"gotcha","affected_versions":">=23.2.0"},{"fix":"Update to 22.9.0+ to avoid adding None to abstract methods.","message":"Autotyping may add None return type to methods marked with @abstractmethod in older versions. Fixed in 22.9.0.","severity":"gotcha","affected_versions":"<22.9.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Upgrade to autotyping 23.3.0 or later.","cause":"Older version crashed on certain argument names like 'iterables' due to a bug.","error":"TypeError: __init__() got an unexpected keyword argument 'iterables'"},{"fix":"Run: pip install autotyping","cause":"autotyping is not installed or not in the current Python environment.","error":"ModuleNotFoundError: No module named 'autotyping'"},{"fix":"Reinstall autotyping: pip install --force-reinstall autotyping","cause":"Missing dependency libcst caused autotyping to fail internally.","error":"TypeError: 'NoneType' object is not iterable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}