Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Added runtime check+exception, explicit Python setup in CI, now requi…
Browse files Browse the repository at this point in the history
…res 3.10 for type hints
  • Loading branch information
why-not-try-calmer committed Feb 15, 2023
1 parent ba090a7 commit 92a0683
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test_pytx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
- name: Check out repository code
uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Run CI tests
env:
organization: ${{ secrets.ORGANIZATION }}
Expand Down
6 changes: 6 additions & 0 deletions pytransifex/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import logging
from sys import version_info

if version_info.major != 3 or version_info.minor < 10:
raise RuntimeError(
f"This program requires Python 3.8 at least, but found {version_info.major}.{version_info.minor}"
)

logging.basicConfig(level=logging.INFO)

0 comments on commit 92a0683

Please sign in to comment.