Skip to content

Commit ac1b2b4

Browse files
authored
Merge pull request #434 from cdorsman/lint-sh-cleanup
Lint sh cleanup
2 parents 821a4dc + 8f0a91c commit ac1b2b4

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

.codespellignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
__pycache__
2+
*.pyc
3+
.idea
4+
*.egg-info/
5+
.tox/
6+
env/
7+
venv/
8+
.env
9+
.venv
10+
.vscode/
11+
.python-version
12+
.coverage
13+
build/
14+
dist/

lint.sh

+11-9
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
pip install --upgrade pip
44
pip install black codespell flake8 isort mypy pytest pyupgrade tox
5-
black --check .
6-
codespell --quiet-level=2 # --ignore-words-list="" --skip=""
7-
flake8 . --count --show-source --statistics
8-
isort --profile black .
9-
tox
105
pip install -e .
11-
mypy --ignore-missing-imports . || true
12-
pytest .
13-
pytest --doctest-modules . || true
14-
shopt -s globstar && pyupgrade --py37-plus **/*.py
6+
7+
source_dir="./patterns"
8+
9+
codespell --quiet-level=2 ./patterns # --ignore-words-list="" --skip=""
10+
flake8 "${source_dir}" --count --show-source --statistics
11+
isort --profile black "${source_dir}"
12+
tox
13+
mypy --ignore-missing-imports "${source_dir}" || true
14+
pytest "${source_dir}"
15+
pytest --doctest-modules "${source_dir}" || true
16+
shopt -s globstar && pyupgrade --py37-plus ${source_dir}/*.py

tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ setenv =
99
deps =
1010
-r requirements-dev.txt
1111
commands =
12-
flake8 . --exclude="./.*, venv"
12+
flake8 --exclude="venv/,.tox/" patterns/
1313
; `randomly-seed` option from `pytest-randomly` helps with deterministic outputs for examples like `other/blackboard.py`
1414
pytest --randomly-seed=1234 --doctest-modules patterns/
15-
pytest -s -vv --cov={envsitepackagesdir}/patterns --log-level=INFO tests/
15+
pytest -s -vv --cov=patterns/ --log-level=INFO tests/
1616

1717

1818
[testenv:cov-report]

0 commit comments

Comments
 (0)