diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-09-21 21:14:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 21:14:50 +0200 |
commit | b867508d903719378e439ec48686565a497ec312 (patch) | |
tree | be101b9687c3729e17c2c647afb9e54a31929874 /astroid/builder.py | |
parent | 61dc314c9daf74ebe76767feeb1a3eb857f67771 (diff) | |
download | astroid-git-b867508d903719378e439ec48686565a497ec312.tar.gz |
Finish typing of ``astroid.manager.py`` (#1806)
Diffstat (limited to 'astroid/builder.py')
-rw-r--r-- | astroid/builder.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/astroid/builder.py b/astroid/builder.py index 24caa0c6..0b8755a3 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -13,6 +13,7 @@ from __future__ import annotations import os import textwrap import types +from collections.abc import Sequence from tokenize import detect_encoding from astroid import bases, modutils, nodes, raw_building, rebuilder, util @@ -261,8 +262,9 @@ class AstroidBuilder(raw_building.InspectBuilder): pass -def build_namespace_package_module(name: str, path: list[str]) -> nodes.Module: - return nodes.Module(name, path=path, package=True) +def build_namespace_package_module(name: str, path: Sequence[str]) -> nodes.Module: + # TODO: Typing: Remove the cast to list and just update typing to accept Sequence + return nodes.Module(name, path=list(path), package=True) def parse(code, module_name="", path=None, apply_transforms=True): |