-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
41 lines (39 loc) · 1.47 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright (c) 2022 Autodesk, Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the ShotGrid Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the ShotGrid Pipeline Toolkit Source Code License. All rights
# not expressly granted therein are reserved by Autodesk, Inc.
# Styles the code properly
# List of super useful formatters.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
# Ensures the code is syntaxically correct
- id: check-ast
language_version: python3
# Ensures a file name will resolve on all platform
- id: check-case-conflict
# Checks files with the execute bit set have shebangs
- id: check-executables-have-shebangs
# Ensure there's no incomplete merges
- id: check-merge-conflict
# Adds an empty line if missing at the end of a file.
- id: end-of-file-fixer
# Makes sure requirements.txt is properly formatted
- id: requirements-txt-fixer
# Removes trailing whitespaces.
- id: trailing-whitespace
# Leave black at the bottom so all touchups are done before it is run.
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
# Exclude folders and file types from code style
exclude: (^docs/|^api/docs|^api/alias_api/python3/)
exclude_types: [ui, py$]