Skip to content

Fix attr-defined mypy errors #387

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

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Conversation

schnellerhase
Copy link
Contributor

@schnellerhase schnellerhase commented Jun 26, 2025

Fixes mypy attr-defined errors, mainly by removing automatic population of the namespaces.

This also uncovered quite a few indirect mypy errors.

There is a more complicated typing problem inside of apply_derivates between the usage of BaseForm and Expr. This appears to require some further fixing on its own. This is currently deactivated by temporarily adding quite a few ignore's to apply_derivatives.py.

Up to this ufl is then mypy compliant. We ignore no more errors on a global scope.

Fixes #386.

@schnellerhase schnellerhase changed the title Remove automatic namespace population in classes.py Fix attr-defined mypy errors Jun 27, 2025
@schnellerhase schnellerhase marked this pull request as ready for review June 27, 2025 16:48
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.

Fix mypy's attr-defined errors
1 participant