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

Generated code: duplication of create_*() methods #61

Closed
christophe-david opened this issue May 28, 2021 · 0 comments · Fixed by #87
Closed

Generated code: duplication of create_*() methods #61

christophe-david opened this issue May 28, 2021 · 0 comments · Fixed by #87

Comments

@christophe-david
Copy link

Considering the analysis Foo with the Bar discipline, in the code that WhatsOpt 1.14.3 generates, we have:

class FooBase(Group):
    ...
    def create_bar(self):
        return Bar()

and

class FooFactoryBase(object):
    ...
    def create_bar(self):
        return Bar()

Therefore, one that would want to overload create_bar() should do it twice, in Foo and FooFactory, which is not DRY.

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 a pull request may close this issue.

1 participant