mirror of https://github.com/citusdata/citus.git
Add python code checks to CI
parent
7bf3084b28
commit
b01d67c943
|
@ -6,7 +6,7 @@ orbs:
|
||||||
parameters:
|
parameters:
|
||||||
image_suffix:
|
image_suffix:
|
||||||
type: string
|
type: string
|
||||||
default: '-v7e4468f'
|
default: '-v9a494cd'
|
||||||
pg13_version:
|
pg13_version:
|
||||||
type: string
|
type: string
|
||||||
default: '13.9'
|
default: '13.9'
|
||||||
|
@ -157,8 +157,17 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
name: 'Check Style'
|
name: 'Check C Style'
|
||||||
command: citus_indent --check
|
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:
|
- run:
|
||||||
name: 'Fix whitespace'
|
name: 'Fix whitespace'
|
||||||
command: ci/editorconfig.sh && git diff --exit-code
|
command: ci/editorconfig.sh && git diff --exit-code
|
||||||
|
|
4
.flake8
4
.flake8
|
@ -1,6 +1,6 @@
|
||||||
[flake8]
|
[flake8]
|
||||||
# Whitespace before ':' (E203) is ignored for black
|
# E203 is ignored for black
|
||||||
# Module level import not at top of file (E402) is ignored because of the way we do relative imports
|
# E402 is ignored because of te way we do relative imports
|
||||||
extend-ignore = E203, E402
|
extend-ignore = E203, E402
|
||||||
# black will truncate to 88 characters usually, but long string literals it
|
# 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.
|
# might keep. That's fine in most cases unless it gets really excessive.
|
||||||
|
|
Loading…
Reference in New Issue