-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added mypy
- Loading branch information
Florian Maas
authored
Apr 25, 2022
1 parent
ad824f0
commit 05cc75d
Showing
17 changed files
with
149 additions
and
251 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import os | ||
|
||
|
||
def main(): | ||
def main() -> None: | ||
cwd = os.path.dirname(__file__) | ||
package_dir = os.path.abspath(os.path.join(cwd, "..")) | ||
os.system(f"cookiecutter {package_dir}") |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: Mypy | ||
--- | ||
|
||
If `mypy` is set to `"y"`, static type checking is added with [mypy](https://mypy.readthedocs.io/en/stable/). | ||
If `"github_actions` is also set to `"y"`, the code is checked with `mypy` during every workflow that is triggered. | ||
The default configuration is as shown below, and can be edited in `pyproject.toml`. | ||
|
||
``` | ||
[tool.mypy] | ||
disallow_untyped_defs = "True" | ||
disallow_any_unimported = "True" | ||
no_implicit_optional = "True" | ||
check_untyped_defs = "True" | ||
warn_return_any = "True" | ||
warn_unused_ignores = "True" | ||
show_error_codes = "True" | ||
exclude = [ | ||
'\.venv', | ||
'{{cookiecutter.project_name}}', | ||
'tests' | ||
] | ||
``` |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.