Skip to content

Commit 2fe6a99

Browse files
author
Andrew Van
committed
update
1 parent 2f39f6b commit 2fe6a99

2 files changed

Lines changed: 42 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.8', '3.9', '3.10', '3.11']
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # Required for setuptools_scm to determine version from git tags
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
cache: 'pip'
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -e ".[dev]"
31+
32+
- name: Run tests
33+
run: pytest
34+
35+
- name: Lint with pre-commit
36+
run: |
37+
pre-commit run --all-files

ezbatch/s3.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import json
2+
from collections.abc import Sequence
13
from dataclasses import dataclass, field
24
from random import getrandbits
3-
from typing import Literal, Sequence, cast, TypedDict
5+
from typing import Literal, TypedDict, cast
46
from warnings import warn
5-
import json
67

78
from dataclasses_json import DataClassJsonMixin
89

@@ -154,7 +155,8 @@ def to_json(self, *args, **kwargs):
154155
for entry in data_dict["read"]
155156
]
156157
nonnull_write = [
157-
{key: value for key, value in entry.items() if key == "source" or key == "destination" or key == "options"} for entry in data_dict["write"]
158+
{key: value for key, value in entry.items() if key == "source" or key == "destination" or key == "options"}
159+
for entry in data_dict["write"]
158160
]
159161
data_dict["read"] = nonnull_read
160162
data_dict["write"] = nonnull_write

0 commit comments

Comments
 (0)