File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
import inspect
2
- import os
3
2
import sys
4
3
import warnings
5
4
from collections import defaultdict , deque
@@ -177,13 +176,13 @@ def _build_graph(self) -> None: # noqa: C901
177
176
try :
178
177
hints = get_type_hints (origin .__init__ )
179
178
except NameError :
180
- _ , src_lineno = inspect .getsourcelines (dep . dependency )
181
- src_file = Path (inspect .getfile (dep . dependency )).relative_to (
179
+ _ , src_lineno = inspect .getsourcelines (origin )
180
+ src_file = Path (inspect .getfile (origin )).relative_to (
182
181
Path .cwd (),
183
182
)
184
183
warnings .warn (
185
184
"Cannot resolve type hints for "
186
- f"a class { dep . dependency .__name__ } defined "
185
+ f"a class { origin .__name__ } defined "
187
186
f"at { src_file } :{ src_lineno } ." ,
188
187
RuntimeWarning ,
189
188
stacklevel = 2 ,
@@ -198,7 +197,7 @@ def _build_graph(self) -> None: # noqa: C901
198
197
try :
199
198
hints = get_type_hints (dep .dependency )
200
199
except NameError :
201
- _ , src_lineno = inspect .getsourcelines (dep .dependency )
200
+ _ , src_lineno = inspect .getsourcelines (dep .dependency ) # type: ignore
202
201
src_file = Path (inspect .getfile (dep .dependency )).relative_to (
203
202
Path .cwd (),
204
203
)
Original file line number Diff line number Diff line change 1
- from collections import UserString
2
1
import re
3
2
import uuid
4
3
from contextlib import asynccontextmanager , contextmanager
You can’t perform that action at this time.
0 commit comments