Skip to content

Commit

Permalink
silence missing imports, (maybe?) hook to tox
Browse files Browse the repository at this point in the history
  • Loading branch information
0xabu committed Aug 21, 2021
1 parent ff4b6a9 commit be15501
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ disallow_any_generics = True
disallow_subclassing_any = True
#disallow_untyped_calls = True
#disallow_untyped_defs = True
#disallow_incomplete_defs = True
disallow_incomplete_defs = True
#check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
Expand All @@ -14,5 +14,6 @@ warn_return_any = True
no_implicit_reexport = True
strict_equality = True

[mypy-pdfminer.*]
[mypy-cryptography.hazmat.*]
ignore_missing_imports = True

2 changes: 1 addition & 1 deletion pdfminer/ccitt.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def main(argv):

class Parser(CCITTG4Parser):
def __init__(self, width, bytealign=False):
import pygame
import pygame # type: ignore
CCITTG4Parser.__init__(self, width, bytealign=bytealign)
self.img = pygame.Surface((self.width, 1000))
return
Expand Down
2 changes: 1 addition & 1 deletion pdfminer/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def export_image(self, image):
if ext == '.jpg':
raw_data = image.stream.get_rawdata()
if LITERAL_DEVICE_CMYK in image.colorspace:
from PIL import Image
from PIL import Image # type: ignore
from PIL import ImageChops
ifp = BytesIO(raw_data)
i = Image.open(ifp)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'cryptography',
],
extras_require={
"dev": ["nose", "tox"],
"dev": ["nose", "tox", "mypy == 0.910"],
"docs": ["sphinx", "sphinx-argparse"],
},
description='PDF parser and analyzer',
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ whitelist_externals =
flake8
commands =
flake8 pdfminer/ tools/ tests/ --count --statistics
mypy --install-types --non-interactive pdfminer
nosetests --nologcapture
python -m sphinx -b html docs/source docs/build/html
python -m sphinx -b doctest docs/source docs/build/doctest

0 comments on commit be15501

Please sign in to comment.