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

fix: duplicate code for extra class ? #27

Open
Cervangirard opened this issue Aug 5, 2024 · 0 comments
Open

fix: duplicate code for extra class ? #27

Cervangirard opened this issue Aug 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Cervangirard
Copy link
Contributor

Cervangirard commented Aug 5, 2024

Looks like inside create_backend, the code to add class is not anymore needed because of super class ?
Here the code if (!is.null(backend$extra_class)) {

now, the connector R6 also give the opportunity to add the extra class, see here :

class(self) <- c(extra_class, class(self))

So, I see pros and cons for both, may be we can keep them.

If we keep only the one inside connector, it means all connectors object will have to inherit from connector. If you forget, then extra class doesn't work. in the other hand, keep it inside create_backend will always allow users to add extra_class inside the yaml file.

@Cervangirard Cervangirard added the bug Something isn't working label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant