Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mypy type linting #177

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
modify coveragerc to ignore "..." lines, ignore pylint errors: TypeVa…
…r invalid-name。
  • Loading branch information
weditor committed Aug 20, 2021
commit b8f555a9defe68a6f0b2fc87761f9bf36070bf22
6 changes: 5 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# .coveragerc
[report]
show_missing = True
show_missing = True
exclude_lines =
pragma: no cover
# ignore lines contains only ellipsis
^\s*\.\.\.\s*$
6 changes: 3 additions & 3 deletions functional/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from operator import mul, add
import collections
from functools import reduce, wraps, partial
from typing import (
from typing import ( # pylint: disable=unused-import
Any,
Callable,
DefaultDict,
Expand Down Expand Up @@ -45,8 +45,8 @@
from functional.execution import ExecutionStrategies


_T_co = TypeVar("_T_co", covariant=True)
_T1_co = TypeVar("_T1_co", covariant=True)
_T_co = TypeVar("_T_co", covariant=True) # pylint: disable=invalid-name
_T1_co = TypeVar("_T1_co", covariant=True) # pylint: disable=invalid-name
_T1 = TypeVar("_T1")
_T2 = TypeVar("_T2")
_T3 = TypeVar("_T3")
Expand Down
4 changes: 2 additions & 2 deletions functional/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from functional.io import get_read_function


_T_co = TypeVar("_T_co", covariant=True)
_T2_co = TypeVar("_T2_co", contravariant=True)
_T_co = TypeVar("_T_co", covariant=True) # pylint: disable=invalid-name
_T2_co = TypeVar("_T2_co", contravariant=True) # pylint: disable=invalid-name


class Stream(object):
Expand Down