Skip to content

add "type: ignore" to lxml imports #4217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mypy/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from mypy.version import __version__

try:
import lxml.etree as etree
import lxml.etree as etree # type: ignore
LXML_INSTALLED = True
except ImportError:
LXML_INSTALLED = False
Expand Down
2 changes: 1 addition & 1 deletion mypy/test/testreports.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from mypy.myunit import Suite, assert_equal
from mypy.report import CoberturaPackage, get_line_rate

import lxml.etree as etree
import lxml.etree as etree # type: ignore


class CoberturaReportSuite(Suite):
Expand Down
5 changes: 3 additions & 2 deletions mypy_self_check.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ warn_no_return = True
strict_optional = True
no_implicit_optional = True
disallow_any_generics = True
disallow_any_unimported = True
# TODO(Jelle): turn these back on after https://github.com/python/typeshed/pull/1664 is resolved
# disallow_any_unimported = True
warn_redundant_casts = True
warn_unused_ignores = True
# warn_unused_ignores = True
warn_unused_configs = True

# needs py2 compatibility
Expand Down