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

Recommend Contract.check methods use **kwargs #139

Open
seddonym opened this issue Oct 18, 2022 · 2 comments
Open

Recommend Contract.check methods use **kwargs #139

seddonym opened this issue Oct 18, 2022 · 2 comments
Labels
good first issue Good for newcomers

Comments

@seddonym
Copy link
Owner

It would improve backwards compatibility for Contract.check methods to implement their check methods like so, in case we want to add arguments:

check(graph: ImportGraph, verbose: bool, **kwargs) -> ContractCheck:

Prompted by #138.

@mwgamble
Copy link
Contributor

Perhaps a better approach would be to create a CheckOptions class, and move the verbose parameter in there. Then you can add additional (optional) parameters to that class as desired, and plugin implementers don't have to adjust their code at all just because a new parameter is added.

@seddonym
Copy link
Owner Author

Good point. It would result in a breaking change though so I think the change would only be appropriate for a major version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants