From 3384ae32c8e08212cfd0fe0249658bb0d274bf7b Mon Sep 17 00:00:00 2001 From: David S Date: Thu, 6 Feb 2020 05:58:25 +0200 Subject: [PATCH 1/3] Add --quiet option to isort command - [x] closes #30974 --- ci/code_checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 0cc42be42d61e..b46989894ae12 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -113,7 +113,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then # Imports - Check formatting using isort see setup.cfg for settings MSG='Check import format using isort' ; echo $MSG - ISORT_CMD="isort --recursive --check-only pandas asv_bench" + ISORT_CMD="isort --quiet --recursive --check-only pandas asv_bench" if [[ "$GITHUB_ACTIONS" == "true" ]]; then eval $ISORT_CMD | awk '{print "##[error]" $0}'; RET=$(($RET + ${PIPESTATUS[0]})) else From 4e72237f340eb63968f4bb099fec272eb6ab5769 Mon Sep 17 00:00:00 2001 From: David Sternlicht Date: Thu, 6 Feb 2020 16:14:31 +0200 Subject: [PATCH 2/3] Demo what the output look like whenever an import is incorrectly sorted --- pandas/_config/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/_config/config.py b/pandas/_config/config.py index 8b6116d3abd60..79ae6e120ad81 100644 --- a/pandas/_config/config.py +++ b/pandas/_config/config.py @@ -49,7 +49,6 @@ """ from collections import namedtuple -from contextlib import contextmanager import re from typing import ( Any, @@ -64,6 +63,7 @@ cast, ) import warnings +from contextlib import contextmanager DeprecatedOption = namedtuple("DeprecatedOption", "key msg rkey removal_ver") RegisteredOption = namedtuple("RegisteredOption", "key defval doc validator cb") From 42f7181cbe8953273e13ef980acfcf07dd5c6edc Mon Sep 17 00:00:00 2001 From: David Sternlicht Date: Thu, 6 Feb 2020 16:15:01 +0200 Subject: [PATCH 3/3] Revert incorrect ordering of imports --- pandas/_config/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/_config/config.py b/pandas/_config/config.py index 79ae6e120ad81..8b6116d3abd60 100644 --- a/pandas/_config/config.py +++ b/pandas/_config/config.py @@ -49,6 +49,7 @@ """ from collections import namedtuple +from contextlib import contextmanager import re from typing import ( Any, @@ -63,7 +64,6 @@ cast, ) import warnings -from contextlib import contextmanager DeprecatedOption = namedtuple("DeprecatedOption", "key msg rkey removal_ver") RegisteredOption = namedtuple("RegisteredOption", "key defval doc validator cb")