mirror of
https://github.com/rendercv/rendercv.git
synced 2026-04-23 16:33:01 -04:00
use pyright for type checking
This commit is contained in:
@@ -86,6 +86,10 @@ These commands are defined in the [`pyproject.toml`](https://github.com/sinaatal
|
||||
```bash
|
||||
hatch run default:sort-imports
|
||||
```
|
||||
- Check the types with [Pyright](https://github.com/RobertCraigie/pyright-python)
|
||||
```bash
|
||||
hatch run default:check-types
|
||||
```
|
||||
- Run the tests:
|
||||
```bash
|
||||
hatch run test:run
|
||||
|
||||
@@ -131,10 +131,11 @@ rendercv = 'rendercv.cli:app'
|
||||
[tool.hatch.envs.default]
|
||||
# Dependencies to be installed in the `default` virtual environment.
|
||||
dependencies = [
|
||||
"ruff==0.4.10", # to lint the code
|
||||
"black==24.4.2", # to format the code
|
||||
"ipython==8.25.0", # for ipython shell
|
||||
"isort==5.13.2", # to sort the imports
|
||||
"ruff==0.4.10", # to lint the code
|
||||
"black==24.4.2", # to format the code
|
||||
"ipython==8.25.0", # for ipython shell
|
||||
"isort==5.13.2", # to sort the imports
|
||||
"pyright==1.1.370", # to check the types
|
||||
]
|
||||
path = ".venv"
|
||||
[tool.hatch.envs.default.scripts]
|
||||
@@ -146,7 +147,8 @@ format = "black rendercv && black docs && black tests" # hatch run format
|
||||
lint = "ruff check rendercv && ruff check docs && ruff check tests" # hatch run lint
|
||||
# Sort the imports in the `rendercv` package with `isort`:
|
||||
sort-imports = "isort rendercv && isort docs && isort tests" # hatch run sort-imports
|
||||
|
||||
# Check types in the `rendercv` package with `pyright`:
|
||||
check-types = "pyright rendercv" # hatch run check-types
|
||||
|
||||
[tool.hatch.envs.docs]
|
||||
# Dependencies to be installed in the `docs` virtual environment.
|
||||
@@ -216,6 +218,11 @@ enable-unstable-feature = [
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
[tool.pyright]
|
||||
reportIncompatibleVariableOverride = false # disable this error type
|
||||
reportIncompatibleMethodOverride = false # disable this error type
|
||||
ignore = ["**/tinytex-release/"]
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ['rendercv'] # The source to measure during execution
|
||||
|
||||
|
||||
Reference in New Issue
Block a user