Skip to content

Commit 4ee3757

Browse files
committed
typing, mypy, black
based on and closes #138
1 parent 5d45a96 commit 4ee3757

File tree

8 files changed

+190
-159
lines changed

8 files changed

+190
-159
lines changed

HISTORY.rst renamed to CHANGELOG.rst

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Changelog
1313
- Support for PyPy (Python 2.7 compatible) has been removed.
1414
- Support for Python 3.8 has been added.
1515
- Support for Python 3.9 has been added.
16+
- Add type hints throughout and support PEP 561 via a py.typed
17+
file. This should allow projects to type check their usage of this dependency.
1618
- Throw ``TypeError`` when creating a priority tree with a ``maximum_streams``
1719
value that is not an integer.
1820
- Throw ``ValueError`` when creating a priority tree with a ``maximum_streams``

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ graft visualizer
55
graft examples
66
prune docs/build
77
recursive-include *.py
8-
include README.rst LICENSE CONTRIBUTORS.rst HISTORY.rst tox.ini
8+
include README.rst LICENSE CHANGELOG.rst CONTRIBUTORS.rst tox.ini
99
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store

setup.cfg

+11
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,14 @@ source =
2222
[flake8]
2323
max-line-length = 120
2424
max-complexity = 10
25+
26+
[mypy]
27+
strict = true
28+
warn_unused_configs = true
29+
show_error_codes = true
30+
31+
[mypy-test_priority]
32+
allow_untyped_defs = true
33+
check_untyped_defs = false
34+
ignore_missing_imports = true
35+
disallow_subclassing_any = false

src/priority/__init__.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33
priority: HTTP/2 priority implementation for Python
44
"""
55
from .priority import ( # noqa
6-
Stream, PriorityTree, DeadlockError, PriorityLoop, PriorityError,
7-
DuplicateStreamError, MissingStreamError, TooManyStreamsError,
8-
BadWeightError, PseudoStreamError
6+
Stream,
7+
PriorityTree,
8+
DeadlockError,
9+
PriorityLoop,
10+
PriorityError,
11+
DuplicateStreamError,
12+
MissingStreamError,
13+
TooManyStreamsError,
14+
BadWeightError,
15+
PseudoStreamError,
916
)
1017

1118

12-
__version__ = '2.0.0+dev'
19+
__version__ = "2.0.0+dev"

0 commit comments

Comments
 (0)