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 2525 run : |
2626 python -m pip install --upgrade pip
2727 python -m pip install --upgrade pipenv==2022.10.4 pre-commit
28- pipenv install --system --skip-lock
28+ pipenv install --dev --skip-lock
2929
3030 - uses : actions/cache@v3
3131 with :
Original file line number Diff line number Diff line change @@ -12,11 +12,17 @@ repos:
1212 hooks :
1313 - id : flake8
1414
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
2026
2127 - repo : https://github.com/pre-commit/pre-commit-hooks
2228 rev : v4.3.0
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ pre-commit = "*"
1616pytest = " *"
1717vcrpy = " >=4.3.0,!=4.3.1,<4.4.0" # v4.3.1 broke decode_compressed_response
1818urllib3 = " <2" # pin until https://github.com/kevin1024/vcrpy/issues/688 is fixed
19- mypy = " ==0.961"
20- types-requests = " *"
2119scriv = { version = " *" , extras = [" toml" ] }
2220responses = " >=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
66profile = " black"
77lines_after_imports = 2
88
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" ]
2911
3012[tool .scriv ]
3113version = " literal: pygitguardian/__init__.py: __version__"
You can’t perform that action at this time.
0 commit comments