Skip to content

Commit 8562f14

Browse files
committed
fix: quick and dirty adding typecheck
1 parent 3e08600 commit 8562f14

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,18 @@ setup:
5151
lint:
5252
flake8 multiaddr/* tests/*
5353

54+
fix:
55+
python -m ruff check --fix .
56+
57+
typecheck:
58+
pre-commit run mypy-local --all-files && pre-commit run pyright-pretty --all-files
59+
5460
test:
55-
TOXENV=py27 tox
61+
python -m pytest tests
5662

5763
test-all:
58-
tox
64+
python3.11 -m pytest tests
65+
python3.13 -m pytest tests
5966

6067
coverage:
6168
coverage run --source multiaddr setup.py test

requirements_dev.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
bumpversion==0.5.3
44
wheel>=0.31.0
5-
watchdog==0.8.3
5+
watchdog>=3.0.0
66
tox==3.6.1
77
coverage==4.5.2
88
Sphinx==1.3.6
99
flake8==3.7.7
1010
pytest
1111
pytest-cov
12+
ruff
13+
mypy
14+
pyright
15+
pre-commit

setup.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
import setuptools
4-
5-
try:
6-
from setuptools import setup
7-
except ImportError:
8-
from distutils.core import setup
4+
from setuptools import setup
95

106

117
with open('README.rst') as readme_file:
@@ -49,6 +45,7 @@
4945
],
5046
setup_requires=[
5147
'pytest-runner',
48+
'setuptools>=42', # Ensure setuptools is available
5249
],
5350
install_requires=[
5451
'varint',

tox.ini

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
[tox]
2-
envlist = lint, py35, py36, py37, py38, pypy3
2+
envlist = py311,py313
33

44
[testenv]
5-
commands = pytest --cov=multiaddr --cov-report=term --cov-report=html:build/test-{envname} --cov-fail-under=100
6-
7-
; If you want to make tox run the tests with the same versions, create a
8-
; requirements.txt with the pinned versions and uncomment the following lines:
9-
deps =
10-
-r{toxinidir}/requirements_dev.txt
11-
12-
[testenv:lint]
13-
basepython = python3
145
deps =
6+
pytest
7+
pytest-cov
158
flake8
169
commands =
17-
flake8 multiaddr/ tests/ setup.py
10+
pytest {posargs:tests}
11+
flake8 multiaddr tests
12+
13+
[flake8]
14+
exclude = .tox,*.egg,build,dist
15+
max-line-length = 100

0 commit comments

Comments
 (0)