fix type annotation in init.rst example (#905)
This commit is contained in:
parent
5f36ba9b89
commit
9727008fd1
|
@ -478,7 +478,7 @@ That said, and as pointed out in the beginning of the chapter, a better approach
|
||||||
client: WebClient
|
client: WebClient
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_token(cls, token: str) -> SomeClass:
|
def from_token(cls, token: str) -> "APIClient":
|
||||||
return cls(client=WebClient(token))
|
return cls(client=WebClient(token))
|
||||||
|
|
||||||
This makes the class more testable.
|
This makes the class more testable.
|
||||||
|
|
Loading…
Reference in New Issue