Menu

#412 Mypy error in emitter.py

open
nobody
None
minor
bug
2021-12-26
2021-12-26
Arun
No

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.

Discussion

  • Anthon van der Neut

    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.

     
  • Anthon van der Neut

    should be fixed in 0.17.19

     
  • Arun

    Arun - 2021-12-26

    Thanks!

     

Log in to post a comment.