summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/complete.py
diff options
context:
space:
mode:
authorThomas Coldrick <othko97@gmail.com>2018-12-20 11:51:43 +0000
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2019-01-03 19:35:09 +0000
commit86a87a76fff09bb67e93eb553f7e3fe914065f7e (patch)
treec2b4c27c4965479bb3bd2845127b2bc038a73f6a /buildstream/_frontend/complete.py
parent669b55b008cd487fdeea0628eb248562f7679cd1 (diff)
downloadbuildstream-coldtom/collections.tar.gz
Use collections.abc for Mapping, Iterablecoldtom/collections
In _yaml.py and _frontend/complete.py we were getting pylint warnings for using collections.Mapping and collections.Iterable, which are abstract classes now provided from collections.abc. This patch just uses the classes from the right place.
Diffstat (limited to 'buildstream/_frontend/complete.py')
-rw-r--r--buildstream/_frontend/complete.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/_frontend/complete.py b/buildstream/_frontend/complete.py
index 1dbdaadb1..bf9324812 100644
--- a/buildstream/_frontend/complete.py
+++ b/buildstream/_frontend/complete.py
@@ -31,7 +31,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-import collections
+import collections.abc
import copy
import os
@@ -218,7 +218,7 @@ def is_incomplete_argument(current_params, cmd_param):
return True
if cmd_param.nargs == -1:
return True
- if isinstance(current_param_values, collections.Iterable) \
+ if isinstance(current_param_values, collections.abc.Iterable) \
and cmd_param.nargs > 1 and len(current_param_values) < cmd_param.nargs:
return True
return False