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

Wrong type annotation #2

Open
paoloq opened this issue Nov 11, 2021 · 2 comments
Open

Wrong type annotation #2

paoloq opened this issue Nov 11, 2021 · 2 comments

Comments

@paoloq
Copy link

paoloq commented Nov 11, 2021

Hi, I encountered an error caused by a wrong type annotation.

def get_authorization_url(
        client_id: str, response_type: str, redirect_uri: str,
        scopes: list[Scope], state: str = None
    ) -> str

As you can see in the case above, list[Scope] causes a runtime error because list is not the right way to type annotate.
It should be changed in List, imported from typing.

I'm going to PR a fix in few minutes, I created this issue just for completeness.

Btw, thanks for starting this great work in creating an SDK for Forge API.
I'm likely to start contributing in next weeks as I'll need it for a new project.

@Magnus-COWI
Copy link
Contributor

Hi @paoloq
I think this is related to #9.
If you use python 3.9 or later you should not get the error.

@petrbroz
Copy link
Owner

petrbroz commented Nov 8, 2022

I've updated the typings in the latest commit (432b3ce). To be honest, I'm not very experienced with typings in Python, so I'm not sure whether to use typings.List or list?

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 a pull request may close this issue.

3 participants