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

No need for instance attribute #199

Closed
nedbat opened this Issue Jul 24, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@nedbat
Copy link

nedbat commented Jul 24, 2018

Here (https://github.com/ets-labs/python-dependency-injector/blob/master/src/dependency_injector/providers.pyx#L90) you don't need to make an object attribute:

self.__overriding_lock = self.__class__.overriding_lock

You can simply access self.overriding_lock in your methods, since you aren't assigning to it, only calling its method.

(Sorry for the drive-by code review. Feel free to close if you don't want to change it.)

@rmk135 rmk135 self-assigned this Jul 24, 2018

@rmk135 rmk135 added the enhancement label Jul 24, 2018

@rmk135

This comment has been minimized.

Copy link
Member

rmk135 commented Jul 24, 2018

Hey @nedbat ,

Feel really proud to get a code review from you 👍 Thanks for the comment, make sense, will definitely refactor it :)

Thanks,
Roman

@rmk135 rmk135 added refactoring and removed enhancement labels Jul 24, 2018

rmk135 added a commit that referenced this issue Jul 26, 2018

@rmk135

This comment has been minimized.

Copy link
Member

rmk135 commented Jul 26, 2018

Done at 3.12.4.

Thanks again, @nedbat!

@rmk135 rmk135 closed this Jul 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.