Skip to content

Commit

Permalink
Subclass list instead of typing.List.
Browse files Browse the repository at this point in the history
This is temporary, until pylint-dev/pylint#3129 is resolved.
  • Loading branch information
Attila Oláh committed Jun 2, 2020
1 parent efc6bfd commit a22b92f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion poly/int_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion poly/int_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a22b92f

Please sign in to comment.