File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ pip-selfcheck.json
13
13
pyvenv.cfg
14
14
.Python
15
15
/.tox /
16
- /.pytest_cache /
16
+ /. * _cache /
17
17
venv
Original file line number Diff line number Diff line change 26
26
PYTHON_EXE? =python3
27
27
ACTIVATE? =. bin/activate;
28
28
VIRTUALENV_PYZ =thirdparty/virtualenv.pyz
29
- BLACK_ARGS=--exclude =".cache|migrations|data| lib|bin|var"
29
+ BLACK_ARGS=--exclude =".cache|lib|bin|var" --line-length 100
30
30
31
31
virtualenv :
32
32
@echo " -> Bootstrap the virtualenv with PYTHON_EXE=${PYTHON_EXE} "
@@ -46,9 +46,27 @@ clean:
46
46
find . -type f -name ' *.py[co]' -delete -o -type d -name __pycache__ \
47
47
-delete -type d -name ' *.egg-info' -delete
48
48
49
+ isort :
50
+ @echo " -> Apply isort changes to ensure proper imports ordering"
51
+ @${ACTIVATE} isort --profile black src/ tests/
52
+
53
+ black :
54
+ @echo " -> Apply black code formatter"
55
+ @${ACTIVATE} black ${BLACK_ARGS} .
56
+
57
+ mypy :
58
+ @echo " -> Type check the Python code."
59
+ @${ACTIVATE} mypy
60
+
61
+ valid :
62
+ @${ACTIVATE} pip install -e .[lint]
63
+ @$(MAKE ) isort
64
+ @$(MAKE ) black
65
+ @$(MAKE ) mypy
66
+
49
67
test :
50
68
@echo " -> Run the test suite"
51
69
${MANAGE} test --noinput
52
70
bin/py.test tests
53
71
54
- .PHONY : virtualenv conf dev clean test
72
+ .PHONY : virtualenv conf dev clean isort black mypy valid test
Original file line number Diff line number Diff line change @@ -129,9 +129,7 @@ def test_purl2url_get_inferred_urls():
129
129
"https://gitlab.com/tg1999/firebase" ,
130
130
"https://gitlab.com/tg1999/firebase/-/archive/1a122122/firebase-1a122122.tar.gz" ,
131
131
],
132
- "pkg:pypi/sortedcontainers@2.4.0" : [
133
- "https://pypi.org/project/sortedcontainers/2.4.0/"
134
- ],
132
+ "pkg:pypi/sortedcontainers@2.4.0" : ["https://pypi.org/project/sortedcontainers/2.4.0/" ],
135
133
"pkg:rubygems/package-name" : ["https://rubygems.org/gems/package-name" ],
136
134
"pkg:bitbucket/birkenfeld" : [],
137
135
}
You can’t perform that action at this time.
0 commit comments