From: Aleš Mrázek Date: Thu, 29 Aug 2024 13:32:29 +0000 (+0200) Subject: scripts/poe-tasks/check: added isort check X-Git-Tag: v6.0.9~18^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c53ab42d3a7954f458c4f45c83f462a7f8d91997;p=thirdparty%2Fknot-resolver.git scripts/poe-tasks/check: added isort check --- diff --git a/pyproject.toml b/pyproject.toml index a5f301cce..4c20d2984 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,6 +98,7 @@ include_trailing_comma=true # corresponds to -tc flag skip_glob = '^((?!py$).)*$' # isort all Python files float_to_top=true skip = "setup.py" # Poetry generates it and we want to keep it unchanged +known_first_party="knot_resolver" [tool.pylint."MESSAGES CONTROL"] disable= [ diff --git a/scripts/poe-tasks/check b/scripts/poe-tasks/check index 8aa33b360..7628b1fba 100755 --- a/scripts/poe-tasks/check +++ b/scripts/poe-tasks/check @@ -36,6 +36,12 @@ black python/knot_resolver tests/manager scripts/poe-tasks/utils/create_setup.py check_rv $? echo +# check imports formatting using isort +echo -e "${yellow}Checking imports formatting using isort...${reset}" +isort python/knot_resolver tests/manager scripts/poe-tasks/utils/create_setup.py --check --diff +check_rv $? +echo + # check code with pylint echo -e "${yellow}Linting using pylint...${reset}" pylint python/knot_resolver