diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Lib/pyclbr.py | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/pyclbr.py')
-rw-r--r-- | contrib/tools/python3/src/Lib/pyclbr.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/tools/python3/src/Lib/pyclbr.py b/contrib/tools/python3/src/Lib/pyclbr.py index 2df08ef330..99a17343fb 100644 --- a/contrib/tools/python3/src/Lib/pyclbr.py +++ b/contrib/tools/python3/src/Lib/pyclbr.py @@ -50,7 +50,7 @@ _modules = {} # Initialize cache of modules we've seen. class _Object: - "Information about Python class or function." + "Information about Python class or function." def __init__(self, module, name, file, lineno, parent): self.module = module self.name = name @@ -160,8 +160,8 @@ def _readmodule(module, path, inpackage=None): else: search_path = path + sys.path spec = importlib.util._find_spec_from_path(fullmodule, search_path) - if spec is None: - raise ModuleNotFoundError(f"no module named {fullmodule!r}", name=fullmodule) + if spec is None: + raise ModuleNotFoundError(f"no module named {fullmodule!r}", name=fullmodule) _modules[fullmodule] = tree # Is module a package? if spec.submodule_search_locations is not None: @@ -171,9 +171,9 @@ def _readmodule(module, path, inpackage=None): except (AttributeError, ImportError): # If module is not Python source, we cannot do anything. return tree - else: - if source is None: - return tree + else: + if source is None: + return tree fname = spec.loader.get_filename(fullmodule) return _create_tree(fullmodule, path, fname, source, tree, inpackage) |