Skip to content

Type hints #390

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

Closed
23 tasks done
niklasf opened this issue Mar 27, 2019 · 3 comments
Closed
23 tasks done

Type hints #390

niklasf opened this issue Mar 27, 2019 · 3 comments
Milestone

Comments

@niklasf
Copy link
Owner

niklasf commented Mar 27, 2019

  • Drop support for Python 3.4, which is now past its end of life. We can then use the typing module that was introduced in 3.5.
  • Type hints:
    • core
    • polyglot
    • svg
    • variant
    • engine
    • syzygy
    • gaviota
    • pgn
  • Mypy passing:
    • core
    • polyglot
    • svg
    • variant
    • engine
    • syzygy
    • gaviota
    • pgn
  • Run mypy in CI
  • Do not resolve aliases in documentation (Option for not unfolding aliases sphinx-doc/sphinx#6518)
  • Annotate data members in documentation
  • Consider newtypes
@niklasf niklasf mentioned this issue Mar 27, 2019
18 tasks
niklasf added a commit that referenced this issue Mar 28, 2019
niklasf added a commit that referenced this issue Mar 28, 2019
@niklasf niklasf mentioned this issue May 7, 2019
@niklasf niklasf added this to the v1.0.0.0 milestone Jan 17, 2020
@niklasf
Copy link
Owner Author

niklasf commented Jan 23, 2020

Missing stdlib typings:

@PedanticHacker
Copy link
Contributor

I don't think we can tick the engine.py module as being passed by mypy just yet, because the mypy that I use spits 2 errors out:

engine.py:701: error: "BaseTransport" has no attribute "write"
engine.py:702: error: "BaseTransport" has no attribute "write"

The code in engine.py lines 699--702 is:

stdin = self.transport.get_pipe_transport(0)
assert stdin is not None, "no pipe for stdin"
stdin.write(line.encode("utf-8"))
stdin.write(b"\n")

@niklasf
Copy link
Owner Author

niklasf commented May 9, 2020

Ah, yes, the returned type of get_pipe_transport() depends on the argument. Added ignore.

@niklasf niklasf closed this as completed Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants