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

Cleanup: Fix Mypy errors in init1.py #408

Merged
merged 1 commit into from
Sep 25, 2023
Merged

Conversation

hoh
Copy link
Member

@hoh hoh commented Sep 20, 2023

The only Mypy error left is related to the use of the type ASGIApplication, defined as:

ASGIApplication = NewType("ASGIApplication", Any)
init1.py:46: error: Argument 2 to NewType(...) must be subclassable (got "Any")  [valid-newtype]

I did not find any easy solution for that. It does not seem blocking.

Copy link
Member

Choose a reason for hiding this comment

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

Can't you just replace Line 35 with

ASGIApplication = Any

in this case? Reading up on NewType, you are not loosing anything important anyways in terms of type safetly, when subclassing Any.

@MHHukiewitz
Copy link
Member

And also, can you add the debian runtime to the paths to be checked by mypy and others in the GH action?

@hoh
Copy link
Member Author

hoh commented Sep 25, 2023

And also, can you add the debian runtime to the paths to be checked by mypy and others in the GH action?

Done in #411

@hoh hoh merged commit 3bfada4 into main Sep 25, 2023
12 checks passed
@hoh hoh deleted the hoh-runtime-init1-fix-mypy branch September 25, 2023 10:16
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