Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add type annotations to clarify some return types #949

@offbyone

Description

@offbyone

I would like to add some type annotations to the project to support type checking with pyright when writing extensions. The specific issue I'm running into is described in microsoft/pyright#9648, which is manifesting when I attempt to override authorization_url() on a custom OAuth implementation to return a dynamic string.

I don't see any existing issues for this, so I'm creating it here. I'm happy to do the work.

I expect it to look something like this:

  1. Add validation of types via pyright to the CI process
  2. Add type annotations incrementally to some base types
  3. Add instructions to the contribution docs recommending more types be added.

Related

  • Drop Python 3.8 Support #946 -- I think this is likely to help with annotations in some cases, although not all; I think we can start without dropping 3.8/3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions