Skip to content

Commit

Permalink
Fix Greeter example in README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
jlecount committed Jan 22, 2022
1 parent 2eaa29d commit b86655c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ If our application's dependencies have their *own* dependencies, Punq will injec
pass
class ConsoleGreeter:
class ConsoleGreeter(Greeter):
def __init__(self, config_reader: ConfigReader):
self.config = config_reader.get_config()
def greet(self):
print(self.config['greeting'])
container.register(Greeter)
container.register(Greeter, ConsoleGreeter)
container.resolve(Greeter).greet()
If you just want to resolve an object without having any base class, that's okay:
Expand Down

0 comments on commit b86655c

Please sign in to comment.