File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed
Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 2020 - name : Install dependencies
2121 run : pip install -e .[lint]
2222
23+ - name : Type check
24+ run : mypy src
25+
2326 - name : Run Black
2427 run : black --check .
2528
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ repos:
1515 - id : requirements-txt-fixer
1616 - id : trailing-whitespace
1717
18+ - repo : https://github.com/pre-commit/mirrors-mypy
19+ rev : v1.19.1
20+ hooks :
21+ - id : mypy
22+
1823 - repo : https://github.com/psf/black
1924 rev : 25.1.0
2025 hooks :
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ docs = [
3333lint = [
3434 " black==25.12.0" ,
3535 " isort==7.0.0" ,
36+ " mypy==1.19.1" ,
3637 " pre-commit==4.5.1" ,
3738 " ruff==0.14.13" ,
3839]
@@ -48,7 +49,13 @@ Issues = "https://github.com/remarkablemark/python-cli-template/issues"
4849[tool .black ]
4950fast = true
5051
52+ [tool .mypy ]
53+ strict = true
54+ ignore_missing_imports = true
55+
5156[tool .coverage .run ]
5257omit = [
58+ " */tests/*" ,
59+ " /opt/*" ,
5360 " /tmp/*" ,
5461]
Original file line number Diff line number Diff line change 33from python_cli_template import __version__ , hello
44
55
6- def main (argv : list [str ] = None ) -> None :
6+ def main (argv : list [str ] = [] ) -> None :
77 parser = ArgumentParser (description = "Python CLI Template" )
88
99 parser .add_argument (
You can’t perform that action at this time.
0 commit comments