Skip to content

Commit

Permalink
Update mypy version (#266)
Browse files Browse the repository at this point in the history
* update mypy version

* introduce 'Generic' for better type support

* invert semantic of parameter
  • Loading branch information
rschwanhold authored Feb 5, 2021
1 parent 8eb70e6 commit 3634494
Show file tree
Hide file tree
Showing 17 changed files with 285 additions and 222 deletions.
40 changes: 24 additions & 16 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pylint = "^2.6.0"
black = "^20.8b1"
pytest = "^6.2.1"
setuptools-scm = "^3.3.3"
mypy = "^0.770"
mypy = "^0.800"

[build-system]
requires = ["poetry>=0.12"]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_bounding_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest


def test_align_with_mag_ceiled():
def test_align_with_mag_ceiled() -> None:

assert BoundingBox((1, 1, 1), (10, 10, 10)).align_with_mag(
Mag(2), ceil=True
Expand All @@ -18,7 +18,7 @@ def test_align_with_mag_ceiled():
) == BoundingBox(topleft=(0, 2, 2), size=(10, 10, 10))


def test_align_with_mag_floored():
def test_align_with_mag_floored() -> None:

assert BoundingBox((1, 1, 1), (10, 10, 10)).align_with_mag(Mag(2)) == BoundingBox(
topleft=(2, 2, 2), size=(8, 8, 8)
Expand All @@ -34,7 +34,7 @@ def test_align_with_mag_floored():
)


def test_in_mag():
def test_in_mag() -> None:

with pytest.raises(AssertionError):
BoundingBox((1, 2, 3), (9, 9, 9)).in_mag(Mag(2))
Expand Down
Loading

0 comments on commit 3634494

Please sign in to comment.