Skip to content

Commit

Permalink
ref: add check for requirements overrides (getsentry#60181)
Browse files Browse the repository at this point in the history
<!-- Describe your PR here. -->
  • Loading branch information
asottile-sentry authored Nov 17, 2023
1 parent 70dfc70 commit 95975ac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ repos:
# exclude the overrides file from this linter -- it doesn't apply at all
exclude: ^requirements-getsentry-overrides\.txt$
additional_dependencies: [packaging==21.3]
- id: requirements-overrides
name: use pinned archives (see comment in file)
stages: [commit]
language: pygrep
entry: |
(?x)
^
# it's a comment line
(?!\#.*$)
# it's a blank line
(?!$)
# it's a pinned archive
(?![a-z-]+[ ]@[ ]https://github\.com/getsentry/[^/]+/archive/[a-f0-9]{40}\.zip$)
files: ^requirements-getsentry-overrides\.txt$
- id: check-mypy-bypass
name: do not bypass the type checker
entry: '(^# *mypy: *ignore-errors|^# *type: *ignore|\bno_type_check\b)'
Expand Down

0 comments on commit 95975ac

Please sign in to comment.