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

Suppress mismatched signature errors in type-checking #1146

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

gycsaba96
Copy link
Contributor

The only purpose of the BaseStore.new and BaseStore.from_xml methods is to provide an overview of how to use the subclasses. However, the mismatched signatures caused typing errors. Suppressing these errors instead of simply deleting the base class methods can still provide this "educational" benefit.

Other options would be:

  • to use an extra generic parameter in these methods (looks a bit over-complicated...)
  • to use composition instead of inheritance (more elegant, but this would probably break existing code and established interfaces)

The only purpose of the BaseStore.new and BaseStore.from_xml
methods is to provide an overview of how to use the subclasses.
However, the mismatched signatures caused typing errors.
Suppressing these errors instead of simply deleting the base class
methods can still provide this "educational" benefit.
@diegogangl diegogangl added enhancement maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers labels Sep 23, 2024
@diegogangl diegogangl merged commit 17781fc into getting-things-gnome:master Sep 23, 2024
1 check failed
@diegogangl
Copy link
Contributor

This sounds like the best solution for me (without having to rewrite). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants