summaryrefslogtreecommitdiff
path: root/astroid/builder.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-09-21 21:14:50 +0200
committerGitHub <noreply@github.com>2022-09-21 21:14:50 +0200
commitb867508d903719378e439ec48686565a497ec312 (patch)
treebe101b9687c3729e17c2c647afb9e54a31929874 /astroid/builder.py
parent61dc314c9daf74ebe76767feeb1a3eb857f67771 (diff)
downloadastroid-git-b867508d903719378e439ec48686565a497ec312.tar.gz
Finish typing of ``astroid.manager.py`` (#1806)
Diffstat (limited to 'astroid/builder.py')
-rw-r--r--astroid/builder.py6
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):