From b01d67c9430581b1aa0c7126e0cf77336f655847 Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Wed, 8 Feb 2023 13:11:08 +0100 Subject: [PATCH] Add python code checks to CI --- .circleci/config.yml | 13 +++++++++++-- .flake8 | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 501f00343..7601f276b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ orbs: parameters: image_suffix: type: string - default: '-v7e4468f' + default: '-v9a494cd' pg13_version: type: string default: '13.9' @@ -157,8 +157,17 @@ jobs: steps: - checkout - run: - name: 'Check Style' + name: 'Check C Style' command: citus_indent --check + - run: + name: 'Check Python style' + command: black --check . + - run: + name: 'Check Python import order' + command: isort --check . + - run: + name: 'Check Python lints' + command: flake8 . - run: name: 'Fix whitespace' command: ci/editorconfig.sh && git diff --exit-code diff --git a/.flake8 b/.flake8 index a52bd806a..112224148 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ [flake8] -# Whitespace before ':' (E203) is ignored for black -# Module level import not at top of file (E402) is ignored because of the way we do relative imports +# E203 is ignored for black +# E402 is ignored because of te way we do relative imports extend-ignore = E203, E402 # black will truncate to 88 characters usually, but long string literals it # might keep. That's fine in most cases unless it gets really excessive.