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

Remove getters/setters in GenericClient, either use @property if they are required or remove them #41

Open
aurelg opened this issue Dec 7, 2018 · 1 comment

Comments

@aurelg
Copy link
Owner

aurelg commented Dec 7, 2018

I noticed several getters/setters in GenericClient. The implementations of the corresponding attributes is quite simple, and their (unlikely) changes would only impact feedspora itself and would be easy to manage without side effects. I think having direct read/write access to attributes would be enough and simplify the code.

OTOH, if there's a good reason I don't get yet to have getters and setters, they should probably be implemented with the @property (see here) to prevent direct access to attributes (and allow for more readable code when calling them).

@wilddeej
Copy link
Contributor

I don't know of any compelling reason why these need to stay, actually. I wonder if there would be any pylint impact, however - I see many complaints in the test code about accessing internal variables...

@aurelg aurelg changed the title Are getters/setters in GenericClient required? If yes: use @property, if not: remove them. Remove getters/setters in GenericClient, either use @property if they are required or remove them Dec 16, 2018
wilddeej added a commit to wilddeej/feedspora that referenced this issue Jan 29, 2019
Fixes Issue aurelg#41
No functionality changes.
Applied property decorators in various locations to improve code readability
and make it more "Pythonic".
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

No branches or pull requests

2 participants