Skip to content

Commit

Permalink
Merge pull request #24 from secondlife/signal/38
Browse files Browse the repository at this point in the history
Fix union hint on < py310
  • Loading branch information
bennettgoble authored Mar 31, 2023
2 parents 9929575 + 4e68b01 commit b1154af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"]
include:
- os: ubuntu-latest
python-version: "3.8"
- os: ubuntu-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "3.10"
env:
OS: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -22,7 +30,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: 3.x
python-version: ${{ matrix.python-version }}

- name: Install python dependencies
run: pip install .[dev,build]
Expand Down
3 changes: 2 additions & 1 deletion autobuild/archive_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import multiprocessing
import tarfile
import zipfile
from typing import Union

class ArchiveType:
GZ = "gz"
Expand Down Expand Up @@ -51,7 +52,7 @@ def detect_archive_type(filename: str):
return _archive_type_from_signature(filename)


def open_archive(filename: str) -> tarfile.TarFile | zipfile.ZipFile:
def open_archive(filename: str) -> Union[tarfile.TarFile, zipfile.ZipFile]:
f_type = detect_archive_type(filename)

if f_type == ArchiveType.ZST:
Expand Down

0 comments on commit b1154af

Please sign in to comment.