Skip to content

akx/python-codemods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.