mirror of
https://github.com/apache/superset.git
synced 2024-10-23 08:34:39 +08:00
chore: add pylint to pre-commit hook (#28137)
This commit is contained in:
parent
2d63722150
commit
7b40b6426c
4
.github/workflows/superset-python-misc.yml
vendored
4
.github/workflows/superset-python-misc.yml
vendored
@ -31,10 +31,6 @@ jobs:
|
||||
- name: Setup Python
|
||||
uses: ./.github/actions/setup-backend/
|
||||
if: steps.check.outputs.python
|
||||
- name: pylint
|
||||
if: steps.check.outputs.python
|
||||
# `-j 0` run Pylint in parallel
|
||||
run: pylint -j 0 superset
|
||||
|
||||
babel-extract:
|
||||
runs-on: ubuntu-20.04
|
||||
|
@ -77,3 +77,17 @@ repos:
|
||||
- id: ruff
|
||||
args: [ --fix ]
|
||||
- id: ruff-format
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pylint
|
||||
name: pylint
|
||||
entry: pylint
|
||||
language: system
|
||||
types: [python]
|
||||
exclude: ^(tests/|superset/migrations/|scripts/|RELEASING/|docker/)
|
||||
args:
|
||||
[
|
||||
"-rn", # Only display messages
|
||||
"-sn", # Don't display the score
|
||||
"--rcfile=.pylintrc",
|
||||
]
|
||||
|
6
setup.py
6
setup.py
@ -30,9 +30,9 @@ with open(PACKAGE_JSON) as package_file:
|
||||
|
||||
def get_git_sha() -> str:
|
||||
try:
|
||||
s = subprocess.check_output(["git", "rev-parse", "HEAD"])
|
||||
return s.decode().strip()
|
||||
except Exception:
|
||||
output = subprocess.check_output(["git", "rev-parse", "HEAD"])
|
||||
return output.decode().strip()
|
||||
except Exception: # pylint: disable=broad-except
|
||||
return ""
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user