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

Use typing NoReturn #1412

Merged
merged 2 commits into from
Jan 14, 2022
Merged

Use typing NoReturn #1412

merged 2 commits into from
Jan 14, 2022

Conversation

aminalaee
Copy link
Member

In a few places where we always raise an exception the type hint should be NoReturn.

Any feedback would be appreciated.

@@ -163,7 +163,7 @@ class URLPath(str):

def __new__(cls, path: str, protocol: str = "", host: str = "") -> "URLPath":
assert protocol in ("http", "websocket", "")
return str.__new__(cls, path) # type: ignore
return str.__new__(cls, path)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ignore and the next one are not used.

@aminalaee aminalaee added the typing Type annotations or mypy issues label Jan 14, 2022
@aminalaee aminalaee merged commit fcc4c70 into master Jan 14, 2022
@aminalaee aminalaee deleted the use-typing-no-return branch January 14, 2022 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typing Type annotations or mypy issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants