Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01c66e7

Browse files
committed
make it a package
1 parent 294158f commit 01c66e7

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

mypy_primer.py renamed to mypy_primer/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,6 +1883,3 @@ def inner() -> int | None:
18831883
),
18841884
]
18851885
assert len(PROJECTS) == len({p.name for p in PROJECTS})
1886-
1887-
if __name__ == "__main__":
1888-
main()

mypy_primer/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import mypy_primer
2+
3+
if __name__ == "__main__":
4+
mypy_primer.main()

test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ set -ex
33
isort --diff --check --quiet .
44
black --diff --check --quiet .
55
flake8 --max-line-length=100 --ignore=E203,W503 $(git ls-files | grep "py$")
6-
mypy -m mypy_primer --strict
6+
mypy -p mypy_primer --strict
77
python -c 'import mypy_primer'

0 commit comments

Comments
 (0)