diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e868de4b..3658951b6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: args: ["--line-length=79"] - repo: https://github.com/pycqa/pylint - rev: pylint-2.7.2 + rev: v2.10.2 hooks: - id: pylint args: ["--disable=import-error"] diff --git a/noxfile.py b/noxfile.py index 7ebab94bb..b2d367cf2 100644 --- a/noxfile.py +++ b/noxfile.py @@ -56,7 +56,7 @@ def _build_setup_requirements() -> Dict[str, List[Requirement]]: def _build_dev_requirements() -> List[Requirement]: """Load requirements from file.""" - with open(REQUIREMENT_PATH, "rt") as req_file: + with open(REQUIREMENT_PATH, "rt", encoding="utf-8") as req_file: return list(parse_requirements(req_file.read())) diff --git a/tests/core/test_decorators.py b/tests/core/test_decorators.py index 8a2a7005d..4782ea4c9 100644 --- a/tests/core/test_decorators.py +++ b/tests/core/test_decorators.py @@ -357,6 +357,7 @@ def validate_inplace(df): for out_schema in [1, 5.0, "foo", {"foo": "bar"}, ["foo"]]: # mypy finds correctly the wrong usage + # pylint: disable=cell-var-from-loop @check_io(out=out_schema) # type: ignore[arg-type] def invalid_out_schema_type(df): return df @@ -688,7 +689,8 @@ def test_check_types_with_literal_type(arg_examples): @check_types def transform_with_literal( df: DataFrame[InSchema], - arg: arg_type, # pylint: disable=unused-argument + # pylint: disable=unused-argument,cell-var-from-loop + arg: arg_type, ) -> DataFrame[OutSchema]: return df.assign(b=100)