(self)
| 329 | return ".".join(parts) |
| 330 | |
| 331 | def reportinfo(self) -> Tuple[Union["os.PathLike[str]", str], Optional[int], str]: |
| 332 | # XXX caching? |
| 333 | obj = self.obj |
| 334 | compat_co_firstlineno = getattr(obj, "compat_co_firstlineno", None) |
| 335 | if isinstance(compat_co_firstlineno, int): |
| 336 | # nose compatibility |
| 337 | file_path = sys.modules[obj.__module__].__file__ |
| 338 | if file_path.endswith(".pyc"): |
| 339 | file_path = file_path[:-1] |
| 340 | path: Union["os.PathLike[str]", str] = file_path |
| 341 | lineno = compat_co_firstlineno |
| 342 | else: |
| 343 | path, lineno = getfslineno(obj) |
| 344 | modpath = self.getmodpath() |
| 345 | assert isinstance(lineno, int) |
| 346 | return path, lineno, modpath |
| 347 | |
| 348 | |
| 349 | # As an optimization, these builtin attribute names are pre-ignored when |
nothing calls this directly
no test coverage detected