{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/3"}],"enrichment":{"capability":"Strips type hints from Python source code while preserving line and column numbers, leaving syntactically valid code that can run on interpreters without type-hint support.","skillfed_tags":["code-transformation","python-compatibility"],"use_cases":["Maintain a single codebase with type hints that must also run on older Python versions without type-hint support","Automatically strip hints from imported modules in the same directory to enable runtime compatibility","Preprocess Python code before execution on interpreters that do not support type annotations","Build custom code transformation tools using the TokenList class for token-level operations","Test or verify that code remains syntactically valid after type-hint removal"],"what_it_does":"strip-hints is a command-line tool and Python library that removes type annotations from Python source files while attempting to preserve the syntactic structure and line/column correspondence of the original code. It was originally designed to allow Python 2 code to be developed with type hints on Python 3 but executed on Python 2; though Python 2 is no longer maintained, the tool remains useful for stripping hints from any codebase that needs to run on interpreters without type-hint support.\n\nThe package provides both a console command and importable functions for programmatic use. It includes a general-purpose TokenList class that operates on Python tokens using a string-like interface, which can be useful for other token-level code transformations. The tool handles edge cases like line breaks within type hints in annotated assignments and return type specifications, with configurable options to control how strictly line numbers are preserved.","worth_installing":"Yes, if you need to strip type hints from Python code. The package is stable, has no known vulnerabilities, and carries a permissive MIT license. Install friction is minimal. The aging maintenance status (539 days since last release) is a minor concern but not a blocker, as the tool's scope is narrow and the repository remains active. Suitable for build pipelines, compatibility layers, or one-off code transformations."},"id":"strip-hints","links":{"html":"https://skillfed.io/packages/strip-hints","md":"https://skillfed.io/packages/strip-hints.md","pypi":"https://pypi.org/project/strip-hints/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-02-21","license_spdx":null,"license_treatment":"unclear","name":"strip-hints","python_support":"unspecified","summary":"Function and command-line program to strip Python type hints."},"popularity":{"monthly_downloads":2267977,"position":3179,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.1.13"}
