Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 486 Bytes

README.md

File metadata and controls

20 lines (12 loc) · 486 Bytes

python-codemods

A collection of Python codemods

no_assert_codemod.py

This is a libCST codemod that rewrites assert X assertions into if not X: raise AssertionError("X").

Usage

python -m libcst.tool codemod no_assert_codemod.RewriteAssertToIfRaise ...py

rtype_codemod.py

This is a libCST codemod that rewrites :rtype: and :type: docstring comments into real annotations.