Skip to content

attempt to wrap the attrs mypy plugin #30

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

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Jun 20, 2025

Very rough draft. Stealing the general approach from the attrs plugin. This can be successfully imported and used from our flopy4 prototype, but it still doesn't properly set up the __init__ method signature, for some reason that til now escapes me.

E.g. when run on the quickstart

docs/examples/quickstart.py:16: error: Unexpected keyword argument "name" for "Simulation"  [call-arg]
docs/examples/quickstart.py:17: error: Unexpected keyword argument "parent" for "Ims"  [call-arg]
docs/examples/quickstart.py:19: error: Unexpected keyword argument "parent" for "Gwf"  [call-arg]
docs/examples/quickstart.py:19: error: Unexpected keyword argument "name" for "Gwf"  [call-arg]
docs/examples/quickstart.py:20: error: Unexpected keyword argument "parent" for "Npf"  [call-arg]
docs/examples/quickstart.py:21: error: Unexpected keyword argument "parent" for "Chd"  [call-arg]

There are more errors because some __init__ arguments passed don't match their expected types, because we're using converters. That can be remedied pretty easily, I am just focusing on getting rid of the errors above first.

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.

1 participant