Strip-hints

Latest version: v0.1.13

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.1.13

-------------------

New features:

* Standalone comment lines that start with `` strip-hints: off`` now turn off
hint-stripping. Standalone comments that start with `` strip-hints: on`` turn
it back on. This can be used as a workaround with, for example, dataclasses.

0.1.12

-------------------

Bug fixes:

* Added a ``pass`` statement before commented-out annotations so ``Protocol``
classes work now.

0.1.11

-------------------

Updated to ``pyproject.toml`` instead of ``setup.py``.

0.1.10

-------------------

Added the options ``--outfile`` and ``--inplace``, along with ``--help``.

Bug fixes:

* Fixed a bug where comments in function return hints that contain both newlines
and comments cause syntax error when the ``--strip-nl`` option is used.

* Fixed a bug in multiline annotated expressions with comments on the lines.

0.1.9

------------------

Added the options ``--strip-nl`` and ``--no-equal-move``. Fixing annotated
assignments with newlines in type hints by moving the line with ``=`` was
added.

0.1.8

-----------------

Added a new Python interface function ``strip_string_to_string`` which works
just the same as ``strip_file_to_string`` except it takes a code string
argument instead of a file name.

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.