Compare commits

..

4 Commits

2 changed files with 22 additions and 2 deletions

7
.gitattributes vendored
View File

@ -13,6 +13,13 @@
# - Avoid merge-conflict when merging from .gitattributeless branch to # - Avoid merge-conflict when merging from .gitattributeless branch to
# .gitattributed branch # .gitattributed branch
# This is the default "binary" macro attribute, but with diffing allowed.
# Use when file contains diffable text, but isn't actually plaintext and thus
# shouldn't have EOL conversion done.
[attr]binaryd diff -merge -text
# Example:
#*.db binaryd
# Built-in diff patterns (disabled by default). The attribute `diff` implies # Built-in diff patterns (disabled by default). The attribute `diff` implies
# `text` and the above attributes are inherited. # `text` and the above attributes are inherited.
# https://www.git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header # https://www.git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header

View File

@ -13,6 +13,7 @@ default_language_version:
python: pypy3 python: pypy3
repos: repos:
# The repo from `pre-commit sample-config`
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 rev: v4.5.0
hooks: hooks:
@ -27,10 +28,15 @@ repos:
exclude: .*\.nginx$ exclude: .*\.nginx$
- id: fix-byte-order-marker - id: fix-byte-order-marker
- id: trailing-whitespace - id: trailing-whitespace
# Markdown allows double trailing space for forced line change. The
# hook appears to remove single ones.
args: ["--markdown-linebreak-ext", "md,markdown"]
# Let's not touch LICENSE files or reuse.software directory # Let's not touch LICENSE files or reuse.software directory
exclude: ^LICENSES\/.*|LICENSE$ exclude: ^LICENSES\/.*|LICENSE$
# File types depending on trailing whitespace. Use identify-cli # Other file extensions where trailing whitespace may be intentional
exclude_types: [svg, markdown, tsv] # and lack of it break things. Use identify-cli for figuring out more
# types to add.
exclude_types: [svg, tsv]
#- id: check-docstring-first #- id: check-docstring-first
#- id: check-json #- id: check-json
- id: check-merge-conflict - id: check-merge-conflict
@ -44,6 +50,8 @@ repos:
[--fix=auto] [--fix=auto]
#- id: pretty-format-json #- id: pretty-format-json
#- id: requirements-txt-fixer #- id: requirements-txt-fixer
# Checks the ci: section on top of the file
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config - repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1 rev: v1.6.1
hooks: hooks:
@ -62,18 +70,22 @@ repos:
# rev: "v1.3.0" # rev: "v1.3.0"
# hooks: # hooks:
# - id: mypy # - id: mypy
# - repo: https://github.com/asottile/pyupgrade # - repo: https://github.com/asottile/pyupgrade
# rev: v3.15.0 # rev: v3.15.0
# hooks: # hooks:
# - id: pyupgrade # - id: pyupgrade
# - repo: https://github.com/asottile/reorder-python-imports # - repo: https://github.com/asottile/reorder-python-imports
# rev: v3.12.0 # rev: v3.12.0
# hooks: # hooks:
# - id: reorder-python-imports # - id: reorder-python-imports
# - repo: https://github.com/asottile/add-trailing-comma # - repo: https://github.com/asottile/add-trailing-comma
# rev: v3.1.0 # rev: v3.1.0
# hooks: # hooks:
# - id: add-trailing-comma # - id: add-trailing-comma
# GitHub Actions etc. configuration validity checking # GitHub Actions etc. configuration validity checking
- repo: https://github.com/python-jsonschema/check-jsonschema - repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.0 rev: 0.27.0
@ -103,6 +115,7 @@ repos:
rev: "v3.0.3" rev: "v3.0.3"
hooks: hooks:
- id: prettier - id: prettier
# These are handled by Black below
exclude_types: exclude_types:
[python, pyi, jupyter] [python, pyi, jupyter]
#additional_dependencies: #additional_dependencies: