Skip to content

Commit e482617

Browse files
committed
Add pre-commit pyright hook for nemoguardrails/rails/
1 parent a278144 commit e482617

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ repos:
2323
args:
2424
- --license-filepath
2525
- LICENSE.md
26-
26+
- repo: local
27+
hooks:
28+
- id: pyright
29+
name: pyright
30+
entry: poetry run pyright
31+
language: system
32+
types: [python]
33+
pass_filenames: false
2734
# Deactivating this for now.
2835
# - repo: https://github.com/pycqa/pylint
2936
# rev: v2.17.0

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ pytest-profiling = "^1.7.0"
151151
yara-python = "^4.5.1"
152152
opentelemetry-api = "^1.34.1"
153153
opentelemetry-sdk = "^1.34.1"
154+
pyright = "^1.1.405"
154155

156+
# Directories in which to run Pyright type-checking
157+
[tool.pyright]
158+
include = ["nemoguardrails/rails/**"]
155159

156160
[tool.poetry.group.docs]
157161
optional = true

0 commit comments

Comments
 (0)