From e5c3b972d7d2f4d4e37fd2e6798fb0c8eb9850ea Mon Sep 17 00:00:00 2001 From: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com> Date: Sat, 10 Jun 2023 11:45:17 +0000 Subject: [PATCH 1/3] add ParserError --- metar/Metar.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metar/Metar.pyi b/metar/Metar.pyi index b6c388fe..24e763bb 100644 --- a/metar/Metar.pyi +++ b/metar/Metar.pyi @@ -16,6 +16,8 @@ def _sanitize(code: str) -> str: ... def _report_match(handler: Callable[[dict], None], match: Match) -> None: ... def _unparsedGroup(self: "Metar", d: dict) -> None: ... +class ParserError(Exception): ... + class Metar: code: str type: Literal["METAR", "SPECI"] From 6cf378c5beec279ef5b2a380625004e2719087f6 Mon Sep 17 00:00:00 2001 From: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com> Date: Sat, 10 Jun 2023 12:58:56 +0000 Subject: [PATCH 2/3] add to CI --- .github/workflows/ci.yml | 15 +++++++++++++++ requirements-typing.txt | 1 + 2 files changed, 16 insertions(+) create mode 100644 requirements-typing.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3831ed35..d96ee0d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,3 +24,18 @@ jobs: pip install codecov codecov fi + typing: + name: Typing Check + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.11"] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install -r requirements-typing.txt + - name: Run mypy + run: mypy metar diff --git a/requirements-typing.txt b/requirements-typing.txt new file mode 100644 index 00000000..a45e2c90 --- /dev/null +++ b/requirements-typing.txt @@ -0,0 +1 @@ +mypy==1.3.0 From 03cd35bcf6a60c82ca09780cf0a12227bcb87b6a Mon Sep 17 00:00:00 2001 From: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com> Date: Sat, 10 Jun 2023 13:04:25 +0000 Subject: [PATCH 3/3] yaml indentation --- .github/workflows/ci.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d96ee0d8..55b740b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,18 +24,18 @@ jobs: pip install codecov codecov fi - typing: - name: Typing Check - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.11"] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: pip install -r requirements-typing.txt - - name: Run mypy - run: mypy metar + typing: + name: Typing Check + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.11"] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install -r requirements-typing.txt + - name: Run mypy + run: mypy metar