This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Optional[] is implied in arguments when the default value is None. Leaving it | |
out is a matter of personal preference and I prefer to leave it out in favor of | |
shorter lines with not obvious behavior. | |
This script removes unnecessary Optional declarations in arguments. | |
WARNING: this updates files in-place. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Search for imports that are not at the top-level and replace them with | |
top-level imports. | |
from x.y import Z -> from x import Z | |
NOTE: doesn't handle comments or `import x as y` | |
""" | |
import argparse |
OlderNewer