Skip to content

Commit

Permalink
Fix Python 3.8 compatibility (#221)
Browse files Browse the repository at this point in the history
Also tweak CI/CD so that the tests run on each Python version (formally
hatch ignored the configured Python version in favour of a global 3.12
environment, hiding this issue).

Fixes #220
  • Loading branch information
bwoodsend authored Aug 30, 2024
1 parent 3f4b343 commit f8a7fd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
- name: Smoke test installation
run: pip install .
- name: Test
run: hatch test --cover
run: hatch test --cover --python ${{ matrix.python-version }}
2 changes: 1 addition & 1 deletion schwifty/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def parse_v2(data: dict[str, Any]) -> list[dict[str, Any]]:
def expand(entry: dict[str, Any], src: str, dst: str) -> list[dict[str, Any]]:
values = entry.pop(src)
entry.setdefault("primary", False)
return [entry | {dst: value} for value in values]
return [{**entry, dst: value} for value in values]

return list(
itertools.chain.from_iterable(
Expand Down

0 comments on commit f8a7fd9

Please sign in to comment.