Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit 5bf919b

Browse files
authored
Minor fixes (#28)
* fix readme links * consistent cases * renamed virtual environment * removed unnecessary quote * updated repository name * updated pre-commit configuration * updated pyproject configuration * disabled pyright inline * disable namespace package check for sphinx configuration * formatted imports of typing stubs * future plans * updated links
1 parent 0cbd0ee commit 5bf919b

7 files changed

Lines changed: 75 additions & 61 deletions

File tree

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ repos:
2626
hooks:
2727
- id: pyupgrade
2828
args:
29+
- --keep-runtime-typing
2930
- --py310-plus
3031
- repo: https://github.com/pycqa/autoflake
3132
rev: v2.2.1
@@ -73,6 +74,9 @@ repos:
7374
- id: mypy
7475
additional_dependencies:
7576
- pydantic
77+
args:
78+
- --ignore-missing-imports
79+
- --scripts-are-modules
7680
pass_filenames: false
7781
stages:
7882
- manual
@@ -94,7 +98,7 @@ repos:
9498
pass_filenames: false
9599
stages:
96100
- manual
97-
- repo: https://github.com/charliermarsh/ruff-pre-commit
101+
- repo: https://github.com/astral-sh/ruff-pre-commit
98102
rev: v0.1.3
99103
hooks:
100104
- id: ruff
@@ -117,7 +121,7 @@ repos:
117121
- src
118122
pass_filenames: false
119123
- repo: https://github.com/adamchainz/blacken-docs
120-
rev: "1.16.0"
124+
rev: 1.16.0
121125
hooks:
122126
- id: blacken-docs
123127
args:

Makefile

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ help: Makefile
3333

3434
.ONESHELL:
3535
venv:
36-
python3 -m venv venv
37-
echo "*" > venv/.gitignore
38-
source venv/bin/activate
36+
python3 -m venv .venv
37+
echo "*" > .venv/.gitignore
38+
source .venv/bin/activate
3939
python3 -m pip install --upgrade pip setuptools wheel
4040
python3 -m pip install --editable ".[all]"
4141

4242
.ONESHELL:
4343
.PHONY: pre-commit-install
4444
pre-commit-install: venv
45-
source venv/bin/activate
45+
source .venv/bin/activate
4646
$(call check_install_status, pre-commit)
4747
pre-commit install
4848

@@ -54,7 +54,7 @@ setup: venv pre-commit-install
5454

5555
.ONESHELL:
5656
venv-upgrade: venv
57-
source venv/bin/activate
57+
source .venv/bin/activate
5858
python3 -m pip install --upgrade pip setuptools wheel
5959
python3 -m pip install --upgrade \
6060
--requirement ${PYTHON_DEPENDENCIES_DIRECTORY}/requirements.txt \
@@ -68,7 +68,7 @@ venv-upgrade: venv
6868
.ONESHELL:
6969
.PHONY: pre-commit-autoupdate
7070
pre-commit-autoupdate: venv
71-
source venv/bin/activate
71+
source .venv/bin/activate
7272
pre-commit autoupdate
7373

7474
## update
@@ -80,21 +80,21 @@ update: venv-upgrade pre-commit-autoupdate
8080
.ONESHELL:
8181
.PHONY: autoflake
8282
autoflake: venv
83-
source venv/bin/activate
83+
source .venv/bin/activate
8484
$(call check_install_status, autoflake)
8585
autoflake $(PYTHON_SOURCE_SCRIPTS)
8686

8787
.ONESHELL:
8888
.PHONY: black
8989
black: venv
90-
source venv/bin/activate
90+
source .venv/bin/activate
9191
$(call check_install_status, black)
9292
black ${PYTHON_SOURCE_DIRECTORY}
9393

9494
.ONESHELL:
9595
.PHONY: blacken-docs
9696
blacken-docs: venv
97-
source venv/bin/activate
97+
source .venv/bin/activate
9898
$(call check_install_status, blacken-docs)
9999
blacken-docs \
100100
--line-length 87 \
@@ -104,22 +104,22 @@ blacken-docs: venv
104104
.ONESHELL:
105105
.PHONY: docformatter
106106
docformatter: venv
107-
source venv/bin/activate
107+
source .venv/bin/activate
108108
$(call check_install_status, docformatter)
109109
$(call check_install_status, tomli)
110110
docformatter ${PYTHON_SOURCE_DIRECTORY}
111111

112112
.ONESHELL:
113113
.PHONY: isort
114114
isort: venv
115-
source venv/bin/activate
115+
source .venv/bin/activate
116116
$(call check_install_status, isort)
117117
isort ${PYTHON_SOURCE_DIRECTORY}
118118

119119
.ONESHELL:
120120
.PHONY: pyupgrade
121121
pyupgrade: venv
122-
source venv/bin/activate
122+
source .venv/bin/activate
123123
$(call check_install_status, pyupgrade)
124124
pyupgrade --py310-plus $(PYTHON_SOURCE_SCRIPTS)
125125

@@ -135,7 +135,7 @@ format: pyupgrade autoflake isort docformatter blacken-docs black
135135
.ONESHELL:
136136
.PHONY: bandit
137137
bandit: venv
138-
source venv/bin/activate
138+
source .venv/bin/activate
139139
$(call check_install_status, bandit)
140140
bandit \
141141
--recursive \
@@ -146,7 +146,7 @@ bandit: venv
146146
.ONESHELL:
147147
.PHONY: flake8
148148
flake8: venv
149-
source venv/bin/activate
149+
source .venv/bin/activate
150150
$(call check_install_status, flake8)
151151
flake8 \
152152
--extend-ignore E203 \
@@ -157,29 +157,29 @@ flake8: venv
157157
.ONESHELL:
158158
.PHONY: interrogate
159159
interrogate: venv
160-
source venv/bin/activate
160+
source .venv/bin/activate
161161
$(call check_install_status, interrogate)
162162
interrogate ${PYTHON_SOURCE_DIRECTORY}
163163

164164
.ONESHELL:
165165
.PHONY: pydocstyle
166166
pydocstyle: venv
167-
source venv/bin/activate
167+
source .venv/bin/activate
168168
$(call check_install_status, pydocstyle)
169169
$(call check_install_status, tomli)
170170
pydocstyle ${PYTHON_SOURCE_DIRECTORY}
171171

172172
.ONESHELL:
173173
.PHONY: pylint
174174
pylint: venv
175-
source venv/bin/activate
175+
source .venv/bin/activate
176176
$(call check_install_status, pylint)
177177
pylint ${PYTHON_SOURCE_DIRECTORY}
178178

179179
.ONESHELL:
180180
.PHONY: vulture
181181
vulture: venv
182-
source venv/bin/activate
182+
source .venv/bin/activate
183183
$(call check_install_status, vulture)
184184
vulture
185185

@@ -196,36 +196,36 @@ lint: bandit flake8 interrogate pydocstyle pylint vulture
196196
.ONESHELL:
197197
.PHONY: pytest-doctest
198198
pytest-doctest: venv
199-
source venv/bin/activate
199+
source .venv/bin/activate
200200
$(call check_install_status, pytest)
201201
pytest -k "not test_"
202202

203203
.ONESHELL:
204204
.PHONY: pytest-failure
205205
pytest-failure: venv
206-
source venv/bin/activate
206+
source .venv/bin/activate
207207
$(call check_install_status, pytest)
208208
pytest -k "failure"
209209

210210
.ONESHELL:
211211
.PHONY: pytest-hypotheses
212212
pytest-hypotheses: venv
213-
source venv/bin/activate
213+
source .venv/bin/activate
214214
$(call check_install_status, hypothesis)
215215
$(call check_install_status, pytest)
216216
pytest -k "hypothesis"
217217

218218
.ONESHELL:
219219
.PHONY: pytest-others
220220
pytest-others: venv
221-
source venv/bin/activate
221+
source .venv/bin/activate
222222
$(call check_install_status, pytest)
223223
pytest -k "test and not failure and not hypothesis and not successful"
224224

225225
.ONESHELL:
226226
.PHONY: pytest-successful
227227
pytest-successful: venv
228-
source venv/bin/activate
228+
source .venv/bin/activate
229229
$(call check_install_status, pytest)
230230
pytest -k "successful"
231231

@@ -241,31 +241,31 @@ test: pytest-doctest pytest-successful pytest-failure pytest-hypotheses pytest-o
241241
.ONESHELL:
242242
.PHONY: coverage-erase
243243
coverage-erase: venv
244-
source venv/bin/activate
244+
source .venv/bin/activate
245245
$(call check_install_status, coverage)
246246
$(call check_install_status, tomli)
247247
coverage erase
248248

249249
.ONESHELL:
250250
.PHONY: coverage-html
251251
coverage-html: venv
252-
source venv/bin/activate
252+
source .venv/bin/activate
253253
$(call check_install_status, coverage)
254254
$(call check_install_status, tomli)
255255
coverage html
256256

257257
.ONESHELL:
258258
.PHONY: coverage-report
259259
coverage-report: venv
260-
source venv/bin/activate
260+
source .venv/bin/activate
261261
$(call check_install_status, coverage)
262262
$(call check_install_status, tomli)
263263
coverage report
264264

265265
.ONESHELL:
266266
.PHONY: coverage-run
267267
coverage-run: venv
268-
source venv/bin/activate
268+
source .venv/bin/activate
269269
$(call check_install_status, coverage)
270270
$(call check_install_status, hypothesis)
271271
$(call check_install_status, pytest)
@@ -275,7 +275,7 @@ coverage-run: venv
275275
.ONESHELL:
276276
.PHONY: coverage-xml
277277
coverage-xml: venv
278-
source venv/bin/activate
278+
source .venv/bin/activate
279279
$(call check_install_status, coverage)
280280
$(call check_install_status, tomli)
281281
coverage xml
@@ -290,7 +290,7 @@ coverage: coverage-run coverage-report coverage-html coverage-xml coverage-erase
290290
.ONESHELL:
291291
.PHONY: sphinx-source
292292
sphinx-source: venv
293-
source venv/bin/activate
293+
source .venv/bin/activate
294294
$(call check_install_status, Sphinx)
295295
sphinx-apidoc \
296296
--output-dir ${PYTHON_DOCS_DIRECTORY}/source \
@@ -304,7 +304,7 @@ sphinx-source: venv
304304
.ONESHELL:
305305
.PHONY: sphinx-build
306306
sphinx-build: venv
307-
source venv/bin/activate
307+
source .venv/bin/activate
308308
$(call check_install_status, furo)
309309
$(call check_install_status, Sphinx)
310310
$(call check_install_status, sphinx-copybutton)
@@ -322,21 +322,21 @@ docs: sphinx-source sphinx-build
322322
.ONESHELL:
323323
.PHONY: build
324324
build: venv
325-
source venv/bin/activate
325+
source .venv/bin/activate
326326
$(call check_install_status, build)
327327
python3 -m build --outdir ${PYTHON_DIST_DIRECTORY}
328328

329329
.ONESHELL:
330330
.PHONY: twine-check
331331
twine-check: venv
332-
source venv/bin/activate
332+
source .venv/bin/activate
333333
$(call check_install_status, twine)
334334
twine check --strict ${PYTHON_DIST_DIRECTORY}/*
335335

336336
.ONESHELL:
337337
.PHONY: twine-upload
338338
twine-upload: venv
339-
source venv/bin/activate
339+
source .venv/bin/activate
340340
$(call check_install_status, twine)
341341
twine upload ${PYTHON_DIST_DIRECTORY}/*
342342

@@ -385,15 +385,15 @@ cleanup: clean-pycache clean-mypy_cache clean-pytest_cache clean-coverage
385385
.ONESHELL:
386386
.PHONY: mypy
387387
mypy: venv
388-
source venv/bin/activate
388+
source .venv/bin/activate
389389
$(call check_install_status, mypy)
390390
$(call check_install_status, pydantic)
391391
mypy
392392

393393
.ONESHELL:
394394
.PHONY: mypy-stubgen
395395
mypy-stubgen: venv
396-
source venv/bin/activate
396+
source .venv/bin/activate
397397
$(call check_install_status, mypy)
398398
stubgen \
399399
--output typing-stubs-for-package-name-to-install-with \
@@ -405,14 +405,14 @@ mypy-stubgen: venv
405405
.ONESHELL:
406406
.PHONY: pyright
407407
pyright: venv
408-
source venv/bin/activate
408+
source .venv/bin/activate
409409
$(call check_install_status, pyright)
410410
pyright
411411

412412
.ONESHELL:
413413
.PHONY: pyright-stubs
414414
pyright-stubs: venv
415-
source venv/bin/activate
415+
source .venv/bin/activate
416416
$(call check_install_status, pyright)
417417
pyright --createstub package_name_to_import_with
418418
pyright --createstub module_that_can_be_imported_directly

0 commit comments

Comments
 (0)