зеркало из
1
0
Форкнуть 0

Add pre-commit config for azure-ai-ml package (#29775)

* Add .pre-commit-config.yaml for black
Co-authored-by: kdestin <101366538+kdestin@users.noreply.github.com>

---------

Co-authored-by: kdestin <101366538+kdestin@users.noreply.github.com>
This commit is contained in:
Diondra 2023-04-13 15:41:13 -05:00 коммит произвёл GitHub
Родитель 2d9130f605
Коммит 069ca145e9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 34 добавлений и 1 удалений

Просмотреть файл

@ -1,6 +1,6 @@
[tool.black]
line-length = 120
extend-exclude = '''
force-exclude = '''
# Exclude some directories from formatting (note the slashes surrounding the pattern)
/(
azure/ai/ml/_restclient

Просмотреть файл

@ -0,0 +1,24 @@
files: sdk/ml/
repos:
- repo: https://github.com/psf/black
rev: 22.3.0 # Needs to be updated whenever azure sdk team bumps
hooks:
- id: black
args: [--config=eng/black-pyproject.toml]
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
types_or: [python]
exclude: ^(sdk/ml/azure-ai-ml/tests/|sdk/ml/azure-ai-ml/azure/ai/ml/_restclient|sdk/ml/azure-ai-ml/setup.py)
# exclude defined here because exclude in pyproject.toml is not being respected
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v6.31.0
hooks:
- id: cspell
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.8.0
hooks:
- id: isort
name: isort (python)
args: ['--settings-file', 'sdk/ml/azure-ai-ml/pyproject.toml']

Просмотреть файл

@ -3,3 +3,12 @@ mypy = false
pyright = false
type_check_samples = false
verifytypes = false
[tool.interrogate]
fail-under = 35
verbose = 2
ignore-module = true
exclude = ["setup.py", "tests", "azure/ai/ml/_restclient"]
[tool.isort]
profile = "black"