Skip to content

Commit

Permalink
bug: use typing extension backport for 3.10 and stop ruff autofixing it
Browse files Browse the repository at this point in the history
  • Loading branch information
alastairtree committed Jul 26, 2024
1 parent 2683680 commit 0ddf05c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 63 deletions.
78 changes: 21 additions & 57 deletions poetry.lock

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

9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[project]
requires-python = ">=3.10"
name = "imap-mag"

[tool.poetry]
name = "imap-mag"
version = "0.1.0"
Expand All @@ -9,7 +13,7 @@ packages = [
]

[tool.poetry.dependencies]
python = ">=3.9,<3.13"
python = ">=3.10,<3.13"
pyyaml = "^6.0.1"
typing-extensions = "^4.9.0"
pydantic = "^2.6.1"
Expand Down Expand Up @@ -38,9 +42,6 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry-pyinstaller-plugin.scripts]
imap-mag = { source = "src/main.py", type = "onefile", bundle = false }

[tool.ruff]
target-version = "py312"

[tool.ruff.lint]
select = [
"D", # pydocstyle
Expand Down
5 changes: 3 additions & 2 deletions src/webPODA.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from pathlib import Path

import requests
from typing_extensions import Unpack


class DownloadOptions(typing.TypedDict):
Expand All @@ -22,7 +23,7 @@ class IWebPODA(abc.ABC):
"""Interface for downloading raw packets from WebPODA."""

@abc.abstractmethod
def download(self, **options: typing.Unpack[DownloadOptions]) -> str:
def download(self, **options: Unpack[DownloadOptions]) -> Path:
"""Download packet data from WebPODA."""
pass

Expand All @@ -39,7 +40,7 @@ def __init__(self, auth_code: str, output_dir: Path) -> None:
self.__auth_code = auth_code
self.__output_dir = output_dir

def download(self, **options: typing.Unpack[DownloadOptions]) -> Path:
def download(self, **options: Unpack[DownloadOptions]) -> Path:
"""Download packet data from WebPODA."""

file_path: Path = self.__output_dir / (options["packet"] + ".bin")
Expand Down

0 comments on commit 0ddf05c

Please sign in to comment.