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

Protocols for AcceptanceCriterion and WeightScheme #61

Closed
N-Wouda opened this issue May 15, 2022 · 4 comments · Fixed by #150
Closed

Protocols for AcceptanceCriterion and WeightScheme #61

N-Wouda opened this issue May 15, 2022 · 4 comments · Fixed by #150
Assignees
Labels
enhancement New feature or request

Comments

@N-Wouda
Copy link
Owner

N-Wouda commented May 15, 2022

I am not a fan of acceptance criteria or weight schemes requiring inheritance to pass type checks. I would much rather use protocols (this PEP), but those are not available in Py3.7.

So we have to wait until EOL of 3.7, which will happen in July 2023.

@N-Wouda N-Wouda added the enhancement New feature or request label May 15, 2022
@N-Wouda N-Wouda self-assigned this May 15, 2022
@N-Wouda
Copy link
Owner Author

N-Wouda commented Jun 16, 2022

They're in typing-extensions for earlier Python versions. Might be worth adding this as a dependency, since many systems will likely already have it installed.

@N-Wouda
Copy link
Owner Author

N-Wouda commented Nov 23, 2022

The WeightScheme base class has since been renamed to OperatorSelectionScheme, but the point stands.

@N-Wouda
Copy link
Owner Author

N-Wouda commented Feb 12, 2023

There's nothing blocking this anymore, so I will try to get this set up in the coming weeks.

@N-Wouda
Copy link
Owner Author

N-Wouda commented May 7, 2023

Since the OperatorSelectionScheme base class has an implementation that does meaningful work, I will leave that explicit inheritance structure intact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant