Skip to content

Commit

Permalink
Fix mypy type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonst committed Dec 7, 2022
1 parent 138a1ab commit 39495db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ warn_redundant_casts = True
warn_incomplete_stub = True
follow_imports = normal
show_error_codes = True
namespace_packages = true
explicit_package_bases = true

# Ignore errors in the docs/conf.py file
[mypy-conf]
[mypy-docs.conf]
ignore_errors = True

[mypy-examples.*]
ignore_errors = True

# TODO: burn these down
Expand Down
2 changes: 1 addition & 1 deletion pynamodb/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def load_module(name, path):
# using the following approach in >= python 3.5:
# https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly
loader = SourceFileLoader(name, path)
return loader.load_module() # type: ignore
return loader.load_module()
else:
from imp import load_source
return load_source(name, path)
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ pytest-cov

# used for type-checking
botocore-stubs
types-six

0 comments on commit 39495db

Please sign in to comment.