2019-06-25 16:34:48 -04:00
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership.
|
|
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
# (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
repos:
|
2023-06-01 15:01:10 -04:00
|
|
|
- repo: https://github.com/MarcoGorelli/auto-walrus
|
|
|
|
rev: v0.2.2
|
|
|
|
hooks:
|
|
|
|
- id: auto-walrus
|
2020-08-04 22:31:52 -04:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2023-05-12 03:47:14 -04:00
|
|
|
rev: v1.3.0
|
2020-08-04 22:31:52 -04:00
|
|
|
hooks:
|
|
|
|
- id: mypy
|
2023-03-13 19:05:13 -04:00
|
|
|
args: [--check-untyped-defs]
|
2023-08-23 08:10:17 -04:00
|
|
|
additional_dependencies: [
|
2023-05-12 03:47:14 -04:00
|
|
|
types-simplejson,
|
|
|
|
types-python-dateutil,
|
|
|
|
types-requests,
|
2023-08-23 08:10:17 -04:00
|
|
|
# types-redis 4.6.0.5 is failing mypy
|
|
|
|
# because of https://github.com/python/typeshed/pull/10531
|
|
|
|
types-redis==4.6.0.4,
|
2023-05-12 03:47:14 -04:00
|
|
|
types-pytz,
|
|
|
|
types-croniter,
|
|
|
|
types-PyYAML,
|
|
|
|
types-setuptools,
|
|
|
|
types-paramiko,
|
|
|
|
types-Markdown,
|
|
|
|
]
|
2020-08-04 22:31:52 -04:00
|
|
|
- repo: https://github.com/peterdemin/pip-compile-multi
|
2023-03-13 19:05:13 -04:00
|
|
|
rev: v2.6.2
|
2019-07-08 12:38:36 -04:00
|
|
|
hooks:
|
2020-08-04 22:31:52 -04:00
|
|
|
- id: pip-compile-multi-verify
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2023-03-13 19:05:13 -04:00
|
|
|
rev: v4.4.0
|
2020-08-04 22:31:52 -04:00
|
|
|
hooks:
|
|
|
|
- id: check-docstring-first
|
2020-09-22 01:48:55 -04:00
|
|
|
- id: check-added-large-files
|
2024-05-03 18:27:40 -04:00
|
|
|
exclude: ^.*\.(geojson)$|^docs/static/img/screenshots/.*
|
2020-08-04 22:31:52 -04:00
|
|
|
- id: check-yaml
|
2020-08-02 17:32:17 -04:00
|
|
|
exclude: ^helm/superset/templates/
|
2020-08-04 22:31:52 -04:00
|
|
|
- id: debug-statements
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: trailing-whitespace
|
|
|
|
args: ["--markdown-linebreak-ext=md"]
|
2021-10-20 20:53:52 -04:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
2024-02-15 09:40:17 -05:00
|
|
|
rev: v3.1.0 # Use the sha or tag you want to point at
|
2021-10-20 20:53:52 -04:00
|
|
|
hooks:
|
|
|
|
- id: prettier
|
2022-10-29 19:29:54 -04:00
|
|
|
args: ["--ignore-path=./superset-frontend/.prettierignore"]
|
|
|
|
files: "superset-frontend"
|
2022-04-05 17:55:30 -04:00
|
|
|
# blacklist unsafe functions like make_url (see #19526)
|
|
|
|
- repo: https://github.com/skorokithakis/blacklist-pre-commit-hook
|
|
|
|
rev: e2f070289d8eddcaec0b580d3bde29437e7c8221
|
|
|
|
hooks:
|
|
|
|
- id: blacklist
|
|
|
|
args: ["--blacklisted-names=make_url", "--ignore=tests/"]
|
2022-10-29 19:29:54 -04:00
|
|
|
- repo: https://github.com/norwoodj/helm-docs
|
|
|
|
rev: v1.11.0
|
|
|
|
hooks:
|
|
|
|
- id: helm-docs
|
|
|
|
files: helm
|
2024-04-24 20:19:53 -04:00
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
|
|
rev: v0.4.0
|
|
|
|
hooks:
|
|
|
|
- id: ruff
|
|
|
|
args: [ --fix ]
|
|
|
|
- id: ruff-format
|
2024-04-25 10:58:44 -04:00
|
|
|
- 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",
|
|
|
|
]
|