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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ dev = [
"Flake8-pyproject>=1.2.3",
"isort>=5.10.1",
"libsass>=0.23.0",
"pyright==1.1.369",
"pyright>=1.1.383",
"pre-commit>=2.15.0",
"wheel",
"matplotlib",
Expand Down
2 changes: 1 addition & 1 deletion shiny/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def guess_mime_type(
if url:
# Work around issue #1601, some installations of Windows 10 return text/plain
# as the mime type for .js files
_, ext = os.path.splitext(os.fspath(url))
_, ext = os.path.splitext(os.fspath(str(url)))
if ext.lower() in [".js", ".mjs", ".cjs"]:
return "text/javascript"
return mimetypes.guess_type(url, strict)[0] or default
Expand Down
6 changes: 5 additions & 1 deletion tests/playwright/shiny/components/data_frame/edit/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ def gt_styles(df_gt: gt.GT) -> list[StyleInfo]:
ret: list[StyleInfo] = []
for style in styles:
location = style.locname
location = "body" if location == "data" else location
location = (
"body"
if location == "data" # pyright: ignore[reportUnnecessaryComparison]
else location
)
assert location == "body", f"`style.locname` is {location}, expected 'body'"
rows = style.rownum
assert rows is not None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ def gt_styles(df_gt: gt.GT) -> list[StyleInfo]:
ret: list[StyleInfo] = []
for style in styles:
location = style.locname
location = "body" if location == "data" else location
location = (
"body"
if location == "data" # pyright: ignore[reportUnnecessaryComparison]
else location
)
assert location == "body", f"`style.locname` is {location}, expected 'body'"
rows = style.rownum
assert rows is not None
Expand All @@ -39,7 +43,7 @@ def gt_styles(df_gt: gt.GT) -> list[StyleInfo]:
)
ret.append(
{
"location": location,
"location": location, # pyright: ignore[reportArgumentType]
"rows": rows,
"cols": cols,
"style": style_obj,
Expand Down
6 changes: 6 additions & 0 deletions tests/playwright/shiny/deprecated/output_transformer/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# pyright: reportUntypedFunctionDecorator=false
# pyright: reportUnknownParameterType=false
# pyright: reportUnknownMemberType=false
# pyright: reportInvalidTypeForm=false
# pyright: reportUnknownArgumentType=false
# pyright: reportArgumentType=false
from __future__ import annotations

import warnings
Expand Down
5 changes: 5 additions & 0 deletions tests/playwright/shiny/server/output_transformer/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# pyright: reportUntypedFunctionDecorator=false
# pyright: reportUnknownMemberType=false
# pyright: reportInvalidTypeForm=false
# pyright: reportUnknownParameterType=false
# pyright: reportUnknownArgumentType=false
from __future__ import annotations

from typing import Optional, overload
Expand Down
6 changes: 6 additions & 0 deletions tests/pytest/test_output_transformer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# pyright: reportUnknownParameterType=false
# pyright: reportUnknownMemberType=false
# pyright: reportInvalidTypeForm=false
# pyright: reportUntypedFunctionDecorator=false
# pyright: reportUnknownArgumentType=false
# pyright: reportFunctionMemberAccess=false
from __future__ import annotations

import asyncio
Expand Down
Loading