diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c08f5a..ae9fe56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 diff --git a/just_sh/parse.py b/just_sh/parse.py index 868256a..2b43383 100644 --- a/just_sh/parse.py +++ b/just_sh/parse.py @@ -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, @@ -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)) diff --git a/pyproject.toml b/pyproject.toml index 63de135..ae36954 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] @@ -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",