Skip to content

Commit

Permalink
Ensure DeprecationWarnings are not introduced via pre-commit (#11255)
Browse files Browse the repository at this point in the history
Deprecated APIs should be announced with FutureWarning, check that
changes don't accidentally introduce DeprecationWarning using a regular
expression that is hopefully specific enough. Closes #11251.

Authors:
  - Lawrence Mitchell (https://github.com/wence-)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

URL: #11255
  • Loading branch information
wence- authored Jul 13, 2022
1 parent 149bbd0 commit 78f0754
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ repos:
args: ['-fallback-style=none', '-style=file', '-i']
- repo: local
hooks:
- id: no-deprecationwarning
name: no-deprecationwarning
description: 'Enforce that DeprecationWarning is not introduced (use FutureWarning instead)'
entry: '(category=|\s)DeprecationWarning[,)]'
language: pygrep
types_or: [python, cython]
- id: cmake-format
name: cmake-format
entry: ./cpp/scripts/run-cmake-format.sh cmake-format
Expand Down

0 comments on commit 78f0754

Please sign in to comment.