Skip to content

Commit

Permalink
Ignore some docutils.utils SystemMessage type hints. The ignored fiel…
Browse files Browse the repository at this point in the history
…ds are custom attrs added onto the original SystemMessage and are not part of the typeshed type hints. (#56)
  • Loading branch information
tdenewiler authored Apr 19, 2022
1 parent 283def7 commit fce32cd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/statick_md/plugins/tool/rstlint_tool_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,19 @@ def parse_output(self, total_output: List[SystemMessage]) -> List[Issue]:
"""Parse tool output and report issues."""
issues: List[Issue] = []

# Have to ignore some type hints as they are an addition to SystemMessage
# and not in the typeshed stubs.
# https://github.com/twolfson/restructuredtext-lint#restructuredtext_lintlintcontent-filepathnone-rst_prolognone
# https://github.com/python/typeshed/blob/master/stubs/docutils/docutils/utils/__init__.pyi
for output in total_output:
issues.append(
Issue(
output.source,
output.line,
output.source, # type: ignore
output.line, # type: ignore
self.get_name(),
output.type,
output.type, # type: ignore
output.level,
output.message,
output.message, # type: ignore
None,
)
)
Expand Down

0 comments on commit fce32cd

Please sign in to comment.