Skip to content

Commit

Permalink
Fix _ErrorLog not iterable
Browse files Browse the repository at this point in the history
Fix the following mypy error:
```
lib/galaxy/tool_util/linters/xsd.py:28: error: "_ErrorLog" has no attribute
"__iter__" (not iterable)  [attr-defined]
                for error in xsd.error_log:
                             ^~~~~~~~~~~~~
```

xref: https://github.com/galaxyproject/galaxy/pull/17081/files#r1490662640
  • Loading branch information
nsoranzo committed Feb 15, 2024
1 parent fc54574 commit 4386c5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lxml-stubs/etree.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,12 @@ def tostring(
inclusive_ns_prefixes: Any = ...,
) -> _AnyStr: ...

class _ErrorLog: ...
class _LogEntry:
path: Optional[str]

class _ErrorLog:
def __iter__(self) -> Iterator["_LogEntry"]: ...

class Error(Exception): ...

class LxmlError(Error):
Expand Down

0 comments on commit 4386c5b

Please sign in to comment.