diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d87fa5203bd52..e846ef9b0d4ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,12 @@ name: CI on: push: - branches: master + branches: + - master pull_request: - branches: master + branches: + - master + - 1.0.x env: ENV_FILE: environment.yml diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 30d3a3ffe5f7b..ea02ddbb81546 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -66,7 +66,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then RET=$(($RET + $?)) ; echo $MSG "DONE" MSG='Linting .pyx code' ; echo $MSG - flake8 --format="$FLAKE8_FORMAT" pandas --filename=*.pyx --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126,E265,E305,E301,E127,E261,E271,E129,W291,E222,E241,E123,F403,C400,C401,C402,C403,C404,C405,C406,C407,C408,C409,C410,C411 + flake8 --format="$FLAKE8_FORMAT" pandas --filename=*.pyx --select=E501,E302,E203,E111,E114,E221,E303,E231,E126,E265,E305,E301,E127,E261,E271,E129,W291,E222,E241,E123,F403,C400,C401,C402,C403,C404,C405,C406,C407,C408,C409,C410,C411 RET=$(($RET + $?)) ; echo $MSG "DONE" MSG='Linting .pxd and .pxi.in' ; echo $MSG diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py index cc41ac1dc19a9..1c7a903df5584 100644 --- a/pandas/core/arrays/interval.py +++ b/pandas/core/arrays/interval.py @@ -1070,6 +1070,7 @@ def mid(self): points) and is either monotonic increasing or monotonic decreasing, else False. """ + # https://github.com/python/mypy/issues/1362 # Mypy does not support decorated properties @property # type: ignore diff --git a/pandas/tests/groupby/test_categorical.py b/pandas/tests/groupby/test_categorical.py index 1c2de8c8c223f..03e87aeb415e5 100644 --- a/pandas/tests/groupby/test_categorical.py +++ b/pandas/tests/groupby/test_categorical.py @@ -497,9 +497,9 @@ def test_dataframe_categorical_ordered_observed_sort(ordered, observed, sort): aggr[aggr.isna()] = "missing" if not all(label == aggr): msg = ( - f"Labels and aggregation results not consistently sorted\n" - + "for (ordered={ordered}, observed={observed}, sort={sort})\n" - + "Result:\n{result}" + "Labels and aggregation results not consistently sorted\n" + f"for (ordered={ordered}, observed={observed}, sort={sort})\n" + f"Result:\n{result}" ) assert False, msg diff --git a/setup.cfg b/setup.cfg index d0570cee6fe10..cf7c5a5ef6563 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,6 +19,8 @@ ignore = W504, # line break after binary operator E402, # module level import not at top of file E731, # do not assign a lambda expression, use a def + E721, # do not compare types, use 'isinstance() + E741, # ambiguous variable name 'l' (GH#34150) C406, # Unnecessary list literal - rewrite as a dict literal. C408, # Unnecessary dict call - rewrite as a literal. C409, # Unnecessary list passed to tuple() - rewrite as a tuple literal.