Skip to content

Commit

Permalink
Merge pull request #11 from christopheredsall/enforce-minimum-python-…
Browse files Browse the repository at this point in the history
…version

Add minimum version check
  • Loading branch information
SimonClifford authored Jul 11, 2023
2 parents 8bab830 + e63bf82 commit 01fdc08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ pip install pytest
cd rpn-calc/src
pytest
```

The minimum required version of Python is 3.10.
3 changes: 3 additions & 0 deletions rpn-calc/src/rpn_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
if TYPE_CHECKING:
from collections.abc import Iterable

MIN_PYTHON = (3, 10)
if sys.version_info < MIN_PYTHON:
sys.exit("Python %s.%s or later is required.\n" % MIN_PYTHON)

def main(commands: "Iterable" = sys.stdin):
'''
Expand Down

0 comments on commit 01fdc08

Please sign in to comment.