Skip to content
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
5 changes: 5 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ jobs:
run: |
make check-format

- name: Verify code can run with mypy (not Windows)
if: steps.install.outcome == 'success' && (success() || failure()) && matrix.os != 'windows-latest'
run: |
make ci-check-mypy-can-run

pypi:
name: "Deploy to PyPI"
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ ci-install-rsconnect: FORCE
uv pip install "rsconnect-python @ git+https://github.com/rstudio/rsconnect-python.git"


# This is just to check if mypy can run for other users.
# Not added to `make check` or `make check-fix` as all lint errors are supporessed (as we use pyright).
ci-check-mypy-can-run: FORCE
@echo "-------- Checking types with mypy -----------"
uv pip install mypy
mypy shiny


# ## If caching is ever used, we could run:
# install-deps: FORCE ## install latest dependencies
# pip install --editable ".[dev,test]" --upgrade --upgrade-strategy eager
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,10 @@ ignore = ["E302", "E501", "F403", "F405", "W503", "E203", "E701", "E704"]
[tool.isort]
profile = "black"
skip = ["__init__.py", "typings/", "_dev/", ".venv", "venv", ".tox", "build"]

[tool.mypy]
# The goal of our usage of mypy is to make to sure mypy can run, not that it catches any errors (we use pyright to find our errors).
# Therefore, ignore_errors but do not ignore runtime errors while checking
# Note: This setting can not be done via CLI and must be set within a config
ignore_errors = true
exclude = ["shiny/api-examples", "shiny/templates"]
4 changes: 2 additions & 2 deletions shiny/render/_data_frame_utils/_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ def _has_rect(self) -> bool:
# Should only contain a single selection area

# Do not include `BrowserCellSelectionAll` as it should be represented by a row, column, or region with appropriate values.
# class BrowserCellSelectionAll(TypedDict):
# type: Literal["all"]
# # class BrowserCellSelectionAll(TypedDict):
# # type: Literal["all"]


class BrowserCellSelectionNone(TypedDict):
Expand Down