Skip to content

Commit

Permalink
utils/UNARY_SCALAR_OPS: Add mypy annotation
Browse files Browse the repository at this point in the history
mypy cannot currently cope with the attributes of properties, incl. fget:

  python/mypy#220
  • Loading branch information
nbraud committed Dec 15, 2018
1 parent f6c494d commit 153ecc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ def angle_isclose(x, y, epsilon = 6.5e-5):

# List of (Vector2) -> scalar operations
UNARY_SCALAR_OPS = [
Vector2.length.fget,
Vector2.length.fget, # type: ignore
# mypy fails to typecheck properties' attributes:
# https://github.com/python/mypy/issues/220
]

0 comments on commit 153ecc4

Please sign in to comment.