You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/09/21 07:41:01 UTC
[buildstream] 01/03: element.py: Make
Element.configure_dependencies() take an Iterable
This is an automated email from the ASF dual-hosted git repository.
tvb pushed a commit to branch tristan/type-annotations
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 24abe42a9138abaa4fec1929aece5f73ae0deaf1
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Thu Sep 16 17:19:57 2021 +0900
element.py: Make Element.configure_dependencies() take an Iterable
Instead of guaranteeing to the plugin that we will give it a List,
it is better to be vague and retain the freedom of passing the plugin
any iterable type here.
---
src/buildstream/element.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index c67f886..091b5d2 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -83,7 +83,7 @@ from contextlib import contextmanager, suppress
from functools import partial
from itertools import chain
import string
-from typing import cast, TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Set, Sequence
+from typing import cast, TYPE_CHECKING, Any, Dict, Iterator, Iterable, List, Optional, Set, Sequence
from pyroaring import BitMap # pylint: disable=no-name-in-module
from ruamel import yaml
@@ -328,7 +328,7 @@ class Element(Plugin):
#############################################################
# Abstract Methods #
#############################################################
- def configure_dependencies(self, dependencies: List[DependencyConfiguration]) -> None:
+ def configure_dependencies(self, dependencies: Iterable[DependencyConfiguration]) -> None:
"""Configure the Element with regards to it's build dependencies
Elements can use this method to parse custom configuration which define their