Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read line from input when using default length #134

Open
MadJlzz opened this issue May 14, 2022 · 0 comments
Open

Cannot read line from input when using default length #134

MadJlzz opened this issue May 14, 2022 · 0 comments
Labels
bug Something isn't working as expected requires confirmation A possible bug that need to be confirmed
Milestone

Comments

@MadJlzz
Copy link

MadJlzz commented May 14, 2022

From
https://github.com/sdispater/cleo/blob/8c3ba5847f33b9da16143f2bba9e3999bb6d3cd5/cleo/io/inputs/input.py#L68-L77

length param default value is None but typing.IO.readline takes an int as parameter:

@abstractmethod
def readline(self, limit: int = -1) -> AnyStr:
  pass

which causes

  'NoneType' object cannot be interpreted as an integer

  at .venv/lib/python3.9/site-packages/cleo/io/inputs/input.py:77 in read_line
       73│         """
       74│         if not self._interactive:
       75│             return default
       76│         
    →  77│         return self._stream.readline(length)
       78│ 
       79│     def close(self) -> None:
       80│         """
       81│         Closes the input.
@Secrus Secrus added the requires confirmation A possible bug that need to be confirmed label Sep 6, 2022
@Secrus Secrus added this to the Future milestone Jul 7, 2023
@Secrus Secrus modified the milestones: Future, 3.0 Nov 28, 2024
@Secrus Secrus added the bug Something isn't working as expected label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected requires confirmation A possible bug that need to be confirmed
Projects
None yet
Development

No branches or pull requests

2 participants