|
| 1 | +exclude: | |
| 2 | + (?x)^( |
| 3 | + docs/(?:.*/)?_supported_.*\.rst$| |
| 4 | + libcloud/data/pricing\.json$ |
| 5 | + ) |
| 6 | +
|
| 7 | +repos: |
| 8 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 9 | + rev: "v5.0.0" |
| 10 | + hooks: |
| 11 | + - id: check-case-conflict |
| 12 | + - id: check-merge-conflict |
| 13 | + - id: check-toml |
| 14 | + - id: check-yaml |
| 15 | + - id: check-json |
| 16 | + exclude: | |
| 17 | + (?x)^( |
| 18 | + libcloud/test/dns/fixtures/pointdns/not_found\.json| |
| 19 | + libcloud/test/dns/fixtures/godaddy/v1_domains_purchase_schema_com\.json| |
| 20 | + libcloud/test/dns/fixtures/gandi_live/get_bad_zone\.json |
| 21 | + )$ |
| 22 | + - id: end-of-file-fixer |
| 23 | + files: &text_files | |
| 24 | + (?x)^( |
| 25 | + libcloud/| |
| 26 | + docs/| |
| 27 | + demos/| |
| 28 | + integration/| |
| 29 | + scripts/| |
| 30 | + contrib/| |
| 31 | + pylint_plugins/| |
| 32 | + \.github/| |
| 33 | + [^/]+\.(py|rst|md|yml|yaml|toml|json|xml|txt|csv|ini|cfg|sh)$ |
| 34 | + ) |
| 35 | + exclude: &fixture_exclude | |
| 36 | + (?x)^( |
| 37 | + libcloud/test/.*/fixtures/| |
| 38 | + integration/.*/fixtures/ |
| 39 | + ) |
| 40 | + - id: trailing-whitespace |
| 41 | + files: *text_files |
| 42 | + exclude: *fixture_exclude |
| 43 | + |
| 44 | + - repo: https://github.com/psf/black |
| 45 | + rev: "25.1.0" |
| 46 | + hooks: |
| 47 | + - id: black |
| 48 | + args: ["--config=pyproject.toml"] |
| 49 | + files: &fmt_py_files | |
| 50 | + (?x)^( |
| 51 | + libcloud/| |
| 52 | + docs/examples/| |
| 53 | + docs/| |
| 54 | + demos/| |
| 55 | + contrib/| |
| 56 | + pylint_plugins/| |
| 57 | + integration/| |
| 58 | + [^/]+\.py$ |
| 59 | + ) |
| 60 | + |
| 61 | + - repo: https://github.com/pycqa/isort |
| 62 | + rev: "6.0.1" |
| 63 | + hooks: |
| 64 | + - id: isort |
| 65 | + args: ["--settings-path=pyproject.toml"] |
| 66 | + files: *fmt_py_files |
| 67 | + |
| 68 | + - repo: https://github.com/pycqa/flake8 |
| 69 | + rev: "5.0.4" |
| 70 | + hooks: |
| 71 | + - id: flake8 |
| 72 | + args: ["--config=./.flake8"] |
| 73 | + files: &lint_py_files | |
| 74 | + (?x)^( |
| 75 | + libcloud/| |
| 76 | + libcloud/test/| |
| 77 | + demos/| |
| 78 | + integration/| |
| 79 | + scripts/| |
| 80 | + docs/examples/| |
| 81 | + contrib/| |
| 82 | + pylint_plugins/ |
| 83 | + ) |
| 84 | + |
| 85 | + - repo: https://github.com/asottile/pyupgrade |
| 86 | + rev: "v3.3.1" |
| 87 | + hooks: |
| 88 | + - id: pyupgrade |
| 89 | + args: ["--py310-plus", "--py3-only"] |
| 90 | + files: *lint_py_files |
| 91 | + |
| 92 | + - repo: https://github.com/codespell-project/codespell |
| 93 | + rev: "v2.4.1" |
| 94 | + hooks: |
| 95 | + - id: codespell |
| 96 | + additional_dependencies: ["tomli"] |
| 97 | + args: ["--toml", "pyproject.toml"] |
| 98 | + files: ^libcloud/ |
0 commit comments