From a22b92fd40e7b9cba97d56c61b065d1a62a8b17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20Ol=C3=A1h?= Date: Tue, 2 Jun 2020 17:58:37 +0200 Subject: [PATCH] Subclass `list` instead of `typing.List`. This is temporary, until https://github.com/PyCQA/pylint/issues/3129 is resolved. --- poly/int_p.py | 4 +++- poly/int_t.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/poly/int_p.py b/poly/int_p.py index 519aae0..f08ecd0 100644 --- a/poly/int_p.py +++ b/poly/int_p.py @@ -4,7 +4,9 @@ from poly.int_t import IntT -class IntP(List[IntT]): +# TODO: Subclass typing.List[IntT] when pylint supports this. +# See https://github.com/PyCQA/pylint/issues/3129. +class IntP(list): """A polynomial with int terms and coefficients. This type implements a sparse representation, i.e. only non-zero terms are diff --git a/poly/int_t.py b/poly/int_t.py index 47758f3..f30a549 100644 --- a/poly/int_t.py +++ b/poly/int_t.py @@ -2,7 +2,9 @@ from typing import Iterable, List, Union -class Ind(List[int]): +# TODO: Subclass typing.List[int] when pylint supports this. +# See https://github.com/PyCQA/pylint/issues/3129. +class Ind(list): """Ind represents the indeterminates of a single term.""" def __init__(self, *args: int) -> None: