Skip to content

Add and fix typing annotations#182

Closed
penguinolog wants to merge 1 commit intojquast:masterfrom
penguinolog:typing
Closed

Add and fix typing annotations#182
penguinolog wants to merge 1 commit intojquast:masterfrom
penguinolog:typing

Conversation

@penguinolog
Copy link
Copy Markdown
Contributor

Since minimal python version is 3.8: use from __future__ import annotations

Since minimal python version is 3.8:
 use `from __future__ import annotations`
@penguinolog
Copy link
Copy Markdown
Contributor Author

@jquast It's not 100% fix for MyPy checks:

  • still not fully annotated SequenceTextWrapper.__init__
  • questions about __all__ for package
  • _is_* helpers return int instead of bool

@jquast
Copy link
Copy Markdown
Owner

jquast commented Jan 23, 2026

ok.. I will keep making this mistake until mypy is integrated into CI, so I guess I'll do that, first

@penguinolog
Copy link
Copy Markdown
Contributor Author

ok.. I will keep making this mistake until mypy is integrated into CI, so I guess I'll do that, first

  • _is_* -> need decision about fix type or force cast to bool
  • __all__ -> also need decision about exporting everything which was imported (or remove from imports, or add to __all__
  • SequenceTextWrapper.__init__ -> I can stupidly put "object" to the kwargs annotation and mypy will accept. Not sure about expanding arguments of original class init.

@jquast
Copy link
Copy Markdown
Owner

jquast commented Jan 23, 2026

Thanks for the details

@jquast
Copy link
Copy Markdown
Owner

jquast commented Jan 23, 2026

Merged into #183

@jquast jquast closed this Jan 23, 2026
jquast added a commit that referenced this pull request Jan 23, 2026
- duplicate sphinx docstring types removed
- correct typing into .j2 template files, regenerate unicode_versions.py
- tried to get autopep8 to reformat line length.. it didn't.
- no code has changed, only annotations and comments.

supersedes / merged with #182 

---------

Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
@penguinolog penguinolog deleted the typing branch January 26, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants