Skip to content

Commit cfcd90a

Browse files
committed
chores(types): add support for python types
1 parent aaac897 commit cfcd90a

36 files changed

+420
-332
lines changed

.flake8

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[flake8]
2+
max-line-length = 120
3+
exclude =
4+
.git,
5+
__pycache__,
6+
build,
7+
dist,
8+
*.egg-info,
9+
ignore =
10+
E203,
11+
W503,
12+
E302,
13+
E501,
14+
W291,
15+
W293,
16+
E401,
17+
E712,
18+
E721,
19+
E241,
20+
per-file-ignores =
21+
__init__.py:F401

Makefile

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
1-
all: register upload
1+
all: build upload
22

3-
register:
4-
python setup.py register
3+
build:
4+
python -m build
55

66
upload:
7-
python setup.py sdist upload
7+
python -m twine upload dist/*
8+
9+
clean:
10+
rm -rf build/ dist/ *.egg-info/ __pycache__/ .pytest_cache/ .mypy_cache/
11+
find . -type f -name "*.pyc" -delete
12+
find . -type d -name "__pycache__" -delete
813

914
test:
10-
for f in $(find . -name '*.py'); do pyflakes $f; done
11-
nosetests
15+
flake8 ioc/ tests/
16+
python -m unittest discover -s tests -p "test_*.py"
17+
sphinx-build -nW -b html -d docs/_build/doctrees docs docs/_build/html
18+
19+
test-strict:
20+
flake8 ioc/ tests/
21+
mypy ioc/
22+
python -m unittest discover -s tests -p "test_*.py"
1223
sphinx-build -nW -b html -d docs/_build/doctrees docs docs/_build/html
24+
25+
lint:
26+
flake8 ioc/ tests/
27+
28+
typecheck:
29+
mypy ioc/
30+
31+
unittest:
32+
python -m unittest discover -s tests -p "test_*.py" -v

ioc/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,15 @@
1414
# under the License.
1515

1616

17+
# Import the build function directly
1718
from ioc.helper import build
19+
20+
# Make helper and misc modules available
21+
# def __getattr__(name):
22+
# if name == 'helper':
23+
# from ioc import helper
24+
# return helper
25+
# elif name == 'misc':
26+
# from ioc import misc
27+
# return misc
28+
# raise AttributeError(f"module 'ioc' has no attribute '{name}'")

0 commit comments

Comments
 (0)