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

New MyPy configuration for per-module type completeness #1596

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

e10e3
Copy link
Contributor

@e10e3 e10e3 commented Aug 23, 2024

As discussed in #1592, this PR enables MyPy's strict mode by default for the repository.
Since none of the modules are fully annotated yet, they have an override to disable the extra rules.

Because MyPy has a configuration bug, the settings enabled by the strict mode need to be disabled individually.

Only the options that raised new errors are disabled in the override : this means that MyPy will now perform more checks over the code.

Add an override for all modules while they are not annotated.
The registry variable of Gymnasium environments is located in the
'registration' module.
This variables is also imported by the 'envs' module, but not explictely
re-exported.
This means the previous code was correct at runtime, but MyPy raised
easily-corrected warnings.
These rules do not cause errors in the current code, meaning they can be
enabled without harm.
@MaxHalford MaxHalford merged commit ba66ee7 into online-ml:main Sep 11, 2024
4 checks passed
@e10e3 e10e3 deleted the typing-config branch September 12, 2024 07:49
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.

3 participants