Skip to content

Commit e686f36

Browse files
committed
Update terminology in the documentation
1 parent 072e868 commit e686f36

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

docs/practices.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ As an illustration:
126126
from threading import Thread
127127
from time import sleep
128128
129-
from injector import inject, Injector, Key, Module, provider
129+
from injector import inject, Injector, Module, provider
130130
131-
SubA = Key('SubA')
132-
A = Key('A')
133-
B = Key('B')
131+
class A: pass
132+
class SubA(A): pass
133+
class B: pass
134134
135135
136136
class BadModule(Module):
@@ -146,11 +146,11 @@ As an illustration:
146146
sleep(1)
147147
148148
# This never executes
149-
return 'suba'
149+
return SubA()
150150
151151
@provider
152152
def provide_b(self) -> B:
153-
return 'b'
153+
return B()
154154
155155
156156
injector = Injector([BadModule])

docs/terminology.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ The default scope is :class:`NoScope`.
2929

3030
.. seealso:: :ref:`scopes`
3131

32-
Keys
33-
````
34-
35-
`Key` may be used to create unique types as necessary::
36-
37-
>>> from injector import Key
38-
>>> Name = Key('name')
39-
>>> Description = Key('description')
40-
4132
Binding
4233
```````
4334

0 commit comments

Comments
 (0)