Mypy error in emitter.py
ruamel.yaml is a YAML 1.2 parser/emitter for Python
Brought to you by:
anthon
Hey, the latest update to emitter.py via the commit https://sourceforge.net/p/ruamel-yaml/code/ci/d7242a1682713ab3940016fb144abaaecc260ceb/ is causing downstream mypy errors in one of my projects. In the line 76 of emitter.py,
def seq_flow_align(self, seq_indent, column, pre_comment=False):
# type: (int, int) -> int
mypy is throwing the error Type signature has too few arguments. Probably, type should be (int, int, Optional[bool]) -> int.
Similarly, in line 556,
def expect_flow_mapping(self, single=False, force_flow_indent=False):
# type: (Optional[bool]) -> None
the type should probably be (Optional[bool, bool]). We started observing this error from 24-Dec-2021.
Thanks reporting, I am not using mypy myself, and it is not part of the "push" command, so it doesn't get tested before a new version. It should be.
should be fixed in 0.17.19
Thanks!