Skip to content

Run pyright on CI #1754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,21 @@ jobs:
run: |
python -m pip install -U pip wheel setuptools
- name: wheel
id: wheel
run: |
python -m pip install -e .[dev]
- name: code-inspection
- name: "code-inspection: mypy"
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
mypy arcade
ruff arcade
python ./make.py mypy
- name: "code-inspection: pyright"
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
python ./make.py pyright
- name: "code-inspection: ruff"
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
python ./make.py ruff
- name: build-docs
run: |
sphinx-build doc build -W
Expand Down
4 changes: 2 additions & 2 deletions arcade/cache/texture.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ def put(
name = texture.cache_name
if strong:
self._strong_entries.put(name, texture)
if self._strong_file_entries.get(file_path):
if self._strong_file_entries.get(file_path): # type: ignore # pending https://github.com/pythonarcade/arcade/issues/1752
raise ValueError(f"File path {file_path} already in cache")
if file_path:
self._strong_file_entries.put(str(file_path), texture)
else:
self._weak_entires.put(name, texture)
if self._weak_file_entries.get(file_path):
if self._weak_file_entries.get(file_path): # type: ignore # pending https://github.com/pythonarcade/arcade/issues/1752
raise ValueError(f"File path {file_path} already in cache")
if file_path:
self._weak_file_entries.put(str(file_path), texture)
Expand Down
3 changes: 2 additions & 1 deletion make.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,11 @@ def pseudoxml():
@app.command(rich_help_panel="Code Quality")
def lint():
"""
Run all linting tasks: ruff and mypy (Run this before making a pull request!)
Run all linting tasks: ruff, mypy, and pyright (Run this before making a pull request!)
"""
ruff()
mypy()
pyright()
print("Linting Complete.")


Expand Down