Skip to content

Commit

Permalink
Fix type hints.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Nov 19, 2020
1 parent 0081a6c commit f5cbcba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions repo_helper_pycharm/iml_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@

# 3rd party
import click
import lxml
import lxml.etree
import lxml # type: ignore
import lxml.etree # type: ignore
from consolekit.utils import coloured_diff
from domdf_python_tools.paths import PathPlus
from domdf_python_tools.stringlist import StringList
from domdf_python_tools.typing import PathLike
from lxml import objectify
Expand Down Expand Up @@ -94,7 +93,8 @@ def write_out(self, show_diff: bool = False) -> int:
modified_xml.append(lxml.etree.tostring(self.root, pretty_print=True).decode("UTF-8"))
modified_xml.blankline(ensure_single=True)

current_content = self.module_file.read_lines()
# TODO: waiting on mypy updating typeshed
current_content = self.module_file.read_lines() # type: ignore

changed = current_content != list(modified_xml)

Expand All @@ -114,7 +114,8 @@ def write_out(self, show_diff: bool = False) -> int:
)
)

self.module_file.write_lines(modified_xml)
# TODO: waiting on mypy updating typeshed
self.module_file.write_lines(modified_xml) # type: ignore

return 1

Expand Down
2 changes: 1 addition & 1 deletion repo_helper_pycharm/register_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from domdf_python_tools.compat import importlib_resources
from domdf_python_tools.typing import PathLike
from domdf_python_tools.words import TAB
from lxml import etree, objectify
from lxml import etree, objectify # type: ignore
from repo_helper.configuration import dump_schema
from repo_helper.core import RepoHelper

Expand Down

0 comments on commit f5cbcba

Please sign in to comment.