Skip to content

Commit

Permalink
Fix testing on old Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrieb committed Dec 21, 2023
1 parent 72b9120 commit 7cdcdd8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
include:
- os: macos-latest
python-version: '3.8'
- os: 'ubuntu-20.04'
python-version: '3.6'
- os: 'ubuntu-20.04'
python-version: '3.7'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -63,12 +67,12 @@ jobs:
run: |
python3 -m pip install .[test]
- name: Install Just on macOS
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
curl -L "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-apple-darwin.tar.gz" \
| sudo tar -C /usr/local/bin -xzv just
- name: Install Just on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
curl -L "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
| sudo tar -C /usr/local/bin -xzv just
Expand Down
4 changes: 2 additions & 2 deletions just_sh/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import sys
from dataclasses import dataclass
from typing import Any, Callable, List, Optional, TextIO, Tuple, Union, cast
from typing import Any, Callable, List, Optional, TextIO, Tuple, Type, Union, cast

from parsy import (
Parser,
Expand Down Expand Up @@ -520,7 +520,7 @@ def _body() -> Parser:
return cast(List[Item], justfile_parser.parse(preprocess(data)))


def run(f: TextIO, encoder: type[json.JSONEncoder], verbose: bool = False) -> None:
def run(f: TextIO, encoder: Type[json.JSONEncoder], verbose: bool = False) -> None:
print(json.dumps(parse(f.read(), verbose=verbose), cls=encoder, indent=2))


Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
########################################################################################

[build-system]
requires = ["setuptools >= 61.0", "setuptools_scm >= 8"]
requires = ["setuptools >= 59.6.0", "setuptools_scm >= 6.4.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools.package-dir]
Expand Down Expand Up @@ -37,7 +37,6 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
# "Programming Language :: Unix Shell",
"Programming Language :: Python :: 3",
"Topic :: Software Development",
"Topic :: Software Development :: Code Generators",
Expand Down

0 comments on commit 7cdcdd8

Please sign in to comment.