]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
scripts/poe-tasks/check: added isort check
authorAleš Mrázek <ales.mrazek@nic.cz>
Thu, 29 Aug 2024 13:32:29 +0000 (15:32 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Fri, 6 Sep 2024 22:28:31 +0000 (00:28 +0200)
pyproject.toml
scripts/poe-tasks/check

index a5f301cce76ad6d69c924440fdecb2fcd4644bb9..4c20d2984783bbe6c901d00de009dd18899df774 100644 (file)
@@ -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= [
index 8aa33b360922966a2d3673dbf346f2650d40d6d4..7628b1fba7ce030fe43408c4478b05f548d9de5c 100755 (executable)
@@ -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