Skip to content

Commit 1345589

Browse files
committed
Fixed more linting errors
1 parent 76c2125 commit 1345589

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/manual_uploads/manual_s3_dynamo_upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def map_dynamo_type(value: Any) -> Dict[str, Any]:
2929

3030

3131
def load_json_lines(filepath: Union[str, Path]) -> Generator[Dict[str, Any], None, None]:
32-
with open(filepath) as f:
32+
with Path.open(filepath) as f:
3333
for line in f:
3434
if line.strip():
3535
yield json.loads(line)

tests/utils/manual_s3_dynamo_upload_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import boto3
44
import pytest
55
from moto import mock_aws
6+
from path import Path
67

78
from scripts.manual_uploads.manual_s3_dynamo_upload import map_dynamo_type, run_upload
89

910

1011
@pytest.fixture
1112
def test_data_dir(tmp_path):
12-
# {"NHS_NUMBER": "C456", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [{"COHORT_LABEL": "under_75", "DATE_JOINED": "2025-01-01"},{"COHORT_LABEL": "over_75", "DATE_JOINED": "2025-01-01"}], "ACTION_FLAG": "ADD", "HASH": "fake_hash_delete_sim", "sync_time": "2025-05-01 12:00:00"}
1313
data = [
1414
{
1515
"NHS_NUMBER": "1234567890",
@@ -28,7 +28,7 @@ def test_data_dir(tmp_path):
2828
},
2929
]
3030
file_path = tmp_path / "test.json"
31-
with open(file_path, "w") as f:
31+
with Path.open(file_path, "w") as f:
3232
for item in data:
3333
f.write(json.dumps(item) + "\n")
3434
return tmp_path, data

0 commit comments

Comments
 (0)