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

Typing cleanup #287

Open
4 of 7 tasks
lemon24 opened this issue Jul 28, 2022 · 0 comments
Open
4 of 7 tasks

Typing cleanup #287

lemon24 opened this issue Jul 28, 2022 · 0 comments

Comments

@lemon24
Copy link
Owner

lemon24 commented Jul 28, 2022

Clean typing stuff. Might be able to use pyupgrade for this.

To do:

  • from __future__ import annotations (and the changes it enables)
  • don't depend on typing_extensions at runtime (example)
  • typing.Self (supported by mypy master, but not by 0.991)
  • show types for data objects in docs
  • move TagFilter, {Feed,Entry}Filter options to _storage (todo) no, used by _search as well, just remove todo
  • make DEFAULT_RESERVED_NAME_SCHEME public
  • move reader.core.*Hook to types

To not do:

  • Consolidate (public) aliases under reader.typing (Flask does it)?
    • No, reader.types is likely good enough (but maybe consolidate them in one place in the file).
  • import typing as t, import typing_extensions as te (Flask does it)?
    • Fewer imports, but makes code look kinda ugly.
    • Also,

      When adding types, the convention is to import types using the form from typing import Union (as opposed to doing just import typing or import typing as t or from typing import *).

lemon24 added a commit that referenced this issue Dec 31, 2022
lemon24 added a commit that referenced this issue Dec 31, 2022
lemon24 added a commit that referenced this issue Dec 31, 2022
lemon24 added a commit that referenced this issue Jan 1, 2023
lemon24 added a commit that referenced this issue Jan 1, 2023
lemon24 added a commit that referenced this issue Oct 29, 2023
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

No branches or pull requests

1 participant