File tree Expand file tree Collapse file tree 4 files changed +15
-28
lines changed Expand file tree Collapse file tree 4 files changed +15
-28
lines changed Original file line number Diff line number Diff line change 25
25
run : |
26
26
python -m pip install --upgrade pip
27
27
python -m pip install --upgrade pipenv==2022.10.4 pre-commit
28
- pipenv install --system --skip-lock
28
+ pipenv install --dev --skip-lock
29
29
30
30
- uses : actions/cache@v3
31
31
with :
Original file line number Diff line number Diff line change @@ -12,11 +12,17 @@ repos:
12
12
hooks :
13
13
- id : flake8
14
14
15
- - repo : https://github.com/pre-commit/mirrors-mypy
16
- rev : v0.961
17
- hooks :
18
- - id : mypy
19
- additional_dependencies : [types-requests]
15
+ # use a "local" repo and not the pyright hook to ensure pyright runs in the same virtualenv
16
+ # as the rest of the code
17
+ - repo : local
18
+ hooks :
19
+ - id : pyright
20
+ name : pyright
21
+ entry : ' pipenv run pyright'
22
+ language : system
23
+ types : [python]
24
+ # do not pass filenames, otherwise Pyright might scan files we don't want it to scan
25
+ pass_filenames : false
20
26
21
27
- repo : https://github.com/pre-commit/pre-commit-hooks
22
28
rev : v4.3.0
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ pre-commit = "*"
16
16
pytest = " *"
17
17
vcrpy = " >=4.3.0,!=4.3.1,<4.4.0" # v4.3.1 broke decode_compressed_response
18
18
urllib3 = " <2" # pin until https://github.com/kevin1024/vcrpy/issues/688 is fixed
19
- mypy = " ==0.961"
20
- types-requests = " *"
21
19
scriv = { version = " *" , extras = [" toml" ] }
22
20
responses = " >=0.23.1,<0.24.0"
21
+ pyright = " ==1.1.313"
Original file line number Diff line number Diff line change @@ -6,26 +6,8 @@ line-length = 88
6
6
profile = " black"
7
7
lines_after_imports = 2
8
8
9
- [tool .mypy ]
10
- python_version = " 3.9"
11
- warn_return_any = true
12
- check_untyped_defs = true
13
- disallow_incomplete_defs = true
14
- disallow_untyped_defs = true
15
- follow_imports = " silent"
16
- ignore_missing_imports = true
17
- no_implicit_optional = true
18
- strict_equality = true
19
- strict_optional = true
20
- warn_incomplete_stub = true
21
- warn_redundant_casts = true
22
- warn_unreachable = true
23
- warn_unused_configs = true
24
- warn_unused_ignores = true
25
-
26
- [[tool .mypy .overrides ]]
27
- module = [" tests.*" , " examples.*" ]
28
- ignore_errors = true
9
+ [tool .pyright ]
10
+ include = [" pygitguardian" ]
29
11
30
12
[tool .scriv ]
31
13
version = " literal: pygitguardian/__init__.py: __version__"
You can’t perform that action at this time.
0 commit comments