diff --git a/src/npe2/manifest/_bases.py b/src/npe2/manifest/_bases.py index 630b75bf..d5e7d7c7 100644 --- a/src/npe2/manifest/_bases.py +++ b/src/npe2/manifest/_bases.py @@ -78,7 +78,7 @@ def from_file(cls, path: Union[Path, str]): try: import tomllib except ImportError: - import tomli as tomllib # type: ignore [no-redef] + import tomli as tomllib loader = tomllib.load elif path.suffix.lower() in (".yaml", ".yml"): diff --git a/src/npe2/manifest/contributions/_themes.py b/src/npe2/manifest/contributions/_themes.py index fa9e2bb3..8085c2b3 100644 --- a/src/npe2/manifest/contributions/_themes.py +++ b/src/npe2/manifest/contributions/_themes.py @@ -1,3 +1,4 @@ +import sys from typing import Literal, Optional, Union from pydantic import BaseModel, color @@ -65,5 +66,6 @@ class ThemeContribution(BaseModel): ' - HSL strings: "`hsl(270, 60%, 70%)"`, `"hsl(270, 60%, 70%, .5)`"\n' ) font_size: str = Field( - description="Font size (in points, pt) used in the application." + default="12pt" if sys.platform == "darwin" else "9pt", + description="Font size (in points, pt) used in the application.", )