exclude: > (?x)( LICENSE$| \.snap$| \.map$| \.map\.js$| ^src/sentry/static/sentry/vendor/| ^tests/sentry/lang/javascript/example-project/| ^src/.*/locale/| ^src/sentry/data/ ) repos: # Many of these hooks are local because people use a variety of IDEs # with autoformatters that need to call out to things like `black` directly. # pre-commit run is not the same, and something like pre-commit exec does # not exist yet. - repo: local hooks: - id: pyupgrade name: pyupgrade entry: pyupgrade args: ['--py38-plus', '--keep-runtime-typing'] language: system types: [python] # Configuration for black exists in pyproject.toml, # but we let pre-commit take care of the file filtering. - id: black name: black entry: black language: system types: [python] require_serial: true # Configuration for isort exists in pyproject.toml, # but we let pre-commit take care of the file filtering. - id: isort name: isort entry: isort language: system types: [python] # Configuration for flake8 exists in setup.cfg, # but we let pre-commit take care of the file filtering. - id: flake8 name: flake8 entry: flake8 language: system types: [python] log_file: '.artifacts/flake8.pycodestyle.log' - id: lint-requirements name: lint-requirements entry: python -m tools.lint_requirements language: python files: requirements-.*\.txt$ additional_dependencies: [packaging==21.3] - id: pyright name: pyright entry: pyright language: node files: ^src/ types: [ python ] require_serial: true additional_dependencies: [ "pyright@1.1.186" ] args: [ '--project', 'pyrightconfig-commithook.json' ] - repo: https://github.com/python-jsonschema/check-jsonschema rev: 0.16.0 hooks: - id: check-github-actions - id: check-github-workflows - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - id: check-case-conflict - id: check-executables-have-shebangs - id: check-merge-conflict - id: check-symlinks - id: end-of-file-fixer exclude_types: [svg] exclude: ^fixtures/ - id: trailing-whitespace exclude_types: [svg] exclude: ^(fixtures/|scripts/patches/) - id: debug-statements - id: name-tests-test args: [--pytest-test-first]