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 a66d301
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .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 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

0 comments on commit a66d301

Please sign in to comment.