Skip to content

No need for instance attribute #199

@nedbat

Description

@nedbat

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.)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions