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
""" | |
Change the "default" flags for files in a project, so new files will require full type annotations. | |
If a file has no flags, it adds "allow-untyped-defs". | |
If a file already has "disallow-untyped-defs", that flag is removed. | |
Together with this script, one should update the mypy.ini file of a project: | |
[mypy.app.*] | |
disallow_untyped_defs = true |
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
from __future__ import print_function | |
import os | |
import requests | |
import ruamel.yaml | |
with open(os.path.expanduser('~/.conda-smithy/circle.token'), 'r') as fh: | |
circle_token = fh.read().strip() |
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
""" | |
Replaces unittest style asserts (e.g.: self.assertEqual) with py.test style asserts | |
Usage: | |
from lib2to3.refactor import RefactoringTool | |
refactoring_tool = RefactoringTool(['fix_pytest']) | |
refactoring_tool.refactor(['input.py'], write=True) | |
""" |