Skip to content

Commit

Permalink
enable pyright again
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz committed Sep 13, 2024
1 parent 036bf02 commit a671de0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
urllib3 = prev.urllib3.overridePythonAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs ++ [ final.hatch-vcs ];
});
pyright = prev.pyright.overridePythonAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs ++ [ final.setuptools ];
});
}
);
python-vatsim = pkgs'.poetry2nix.mkPoetryApplication {
Expand Down
31 changes: 30 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ regex = ">=2023.12.25,<2025.0.0"
ruff = "0.6.1"
pytest = "^8"
pytest-cov = ">=4.1,<6.0"
#pyright = "1.1.379"
pyright = "1.1.380"

[tool.pytest.ini_options]
addopts = ["--cov-report=term", "--cov-report=xml:cov.xml", "--cov=vatsim"]
Expand Down
4 changes: 2 additions & 2 deletions vatsim/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def callsign_validator(cls, v: str) -> str:

@model_validator(mode="before")
@classmethod
def atis_validator(cls, data: dict[str, Any] | Any) -> Any:
if isinstance(data, dict) and "text_atis" in data:
def atis_validator(cls, data: dict[str, Any]) -> dict[str, Any]:
if "text_atis" in data:
if data["text_atis"] is not None:
if not isinstance(data["text_atis"], str):
data["text_atis"] = "\n".join(cast(list[str], data["text_atis"]))
Expand Down

0 comments on commit a671de0

Please sign in to comment.