Skip to content

Commit

Permalink
chore: update black to 23.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mikix committed Nov 10, 2023
1 parent f73e599 commit c54910e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
# black is synced with the .pre-commit-hooks version
run: |
python -m pip install --upgrade pip
pip install bandit[toml] pycodestyle pylint black==22.12.0
pip install bandit[toml] pycodestyle pylint black==23.11.0
- name: Run pycodestyle
# E203: pycodestyle is a little too rigid about slices & whitespace
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/psf/black
# this version is synced with the black mentioned in .github/workflows/ci.yml
rev: 22.12.0
rev: 23.11.0
hooks:
- id: black
entry: bash -c 'black "$@"; git add -u' --
Expand Down
1 change: 1 addition & 0 deletions cumulus_etl/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#
###############################################################################


# We often want the ability to provide a TemporaryDirectory _or_ an actual real folder that isn't temporary.
# So for that use case, we define a Directory protocol for typing purposes, which looks like a TemporaryDirectory.
# And then a RealDirectory class that does not delete its folder.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ tests = [
"respx",
]
dev = [
"black == 22.12.0",
"black == 23.11.0",
"pre-commit"
]
1 change: 1 addition & 0 deletions tests/etl/test_batching.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class TestBatching(AsyncTestCase):
@ddt.unpack
async def test_batch_iterate(self, values, batch_size, expected):
"""Check a bunch of edge cases for the batch_iterate helper"""

# Tiny little convenience method to be turn sync lists into async iterators.
async def async_iter() -> AsyncIterator:
for x in values:
Expand Down
13 changes: 10 additions & 3 deletions tests/fhir/test_fhir_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ async def test_get_error_429(self):
)
async def test_get_error_other(self, response_args):
"""Verify that other http errors are FatalErrors."""
self.respx_mock.get(f"{self.server_url}/foo",).mock(
self.respx_mock.get(
f"{self.server_url}/foo",
).mock(
return_value=make_response(status_code=500, **response_args),
)

Expand Down Expand Up @@ -333,11 +335,16 @@ def mock_as_server_type(self, server_type: str | None):
@ddt.unpack
async def test_client_id_in_header(self, server_type, expected_text):
# Mock with header
self.respx_mock.get(f"{self.server_url}/file", headers={"Epic-Client-ID": "my-id"},).respond(
self.respx_mock.get(
f"{self.server_url}/file",
headers={"Epic-Client-ID": "my-id"},
).respond(
text="present",
)
# And without
self.respx_mock.get(f"{self.server_url}/file",).respond(
self.respx_mock.get(
f"{self.server_url}/file",
).respond(
text="missing",
)

Expand Down
4 changes: 3 additions & 1 deletion tests/test_bulk_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ def set_up_requests(self, respx_mock):
)

# /token
respx_mock.post(f"{self.root.path}/token",).respond(
respx_mock.post(
f"{self.root.path}/token",
).respond(
json={
"access_token": "1234567890",
},
Expand Down

0 comments on commit c54910e

Please sign in to comment.