From 8210af392b7f7a95fc460967397bf3cef1f89cfa Mon Sep 17 00:00:00 2001 From: Manuel Giffels Date: Mon, 5 Feb 2024 09:17:26 +0100 Subject: [PATCH] Fix black format changes --- .pre-commit-config.yaml | 2 +- docs/source/changelog.rst | 4 ++-- tardis/adapters/sites/fakesite.py | 2 +- tardis/utilities/asyncbulkcall.py | 3 +-- tests/agents_t/test_batchsystemagent.py | 6 +++--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b5e5c1b5..c60b842d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: check-merge-conflict - id: end-of-file-fixer - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 24.1.1 hooks: - id: black args: diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index d15197cd..4da36d0a 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -1,4 +1,4 @@ -.. Created by changelog.py at 2024-01-23, command +.. Created by changelog.py at 2024-02-05, command '/Users/giffler/.cache/pre-commit/repoecmh3ah8/py_env-python3.12/bin/changelog docs/source/changes compile --categories Added Changed Fixed Security Deprecated --output=docs/source/changelog.rst' based on the format of 'https://keepachangelog.com/' @@ -6,7 +6,7 @@ CHANGELOG ######### -[Unreleased] - 2024-01-23 +[Unreleased] - 2024-02-05 ========================= Fixed diff --git a/tardis/adapters/sites/fakesite.py b/tardis/adapters/sites/fakesite.py index 7cbff619..b158c705 100644 --- a/tardis/adapters/sites/fakesite.py +++ b/tardis/adapters/sites/fakesite.py @@ -53,7 +53,7 @@ async def resource_status( seconds=resource_boot_time ) and resource_attributes.get( "resource_status", - ResourceStatus.Booting + ResourceStatus.Booting, # When cobald is restarted, "resource_status" is not set. Since this is a # FakeAdapter, when can safely start the cycle again by assuming # ResourceStatus.Booting and let TARDIS manage the drone's life cycle diff --git a/tardis/utilities/asyncbulkcall.py b/tardis/utilities/asyncbulkcall.py index 97e3bd58..d5fc1d46 100644 --- a/tardis/utilities/asyncbulkcall.py +++ b/tardis/utilities/asyncbulkcall.py @@ -20,8 +20,7 @@ class BulkCommand(Protocol[T, R]): :py:class:`Exception` means that all tasks failed with that :py:class:`Exception`. """ - async def __call__(self, *__tasks: T) -> Optional[Iterable[R]]: - ... + async def __call__(self, *__tasks: T) -> Optional[Iterable[R]]: ... # noqa E704 class AsyncBulkCall(Generic[T, R]): diff --git a/tests/agents_t/test_batchsystemagent.py b/tests/agents_t/test_batchsystemagent.py index f825c18a..79343bd9 100644 --- a/tests/agents_t/test_batchsystemagent.py +++ b/tests/agents_t/test_batchsystemagent.py @@ -48,9 +48,9 @@ def test_machine_meta_data_translation_mapping(self): return_value=AttributeDict(Cores=1, Memory=1024, Disk=1024) ) - type( - self.batch_system_adapter - ).machine_meta_data_translation_mapping = machine_meta_data_translation_mock + type(self.batch_system_adapter).machine_meta_data_translation_mapping = ( + machine_meta_data_translation_mock + ) self.assertEqual( AttributeDict(Cores=1, Memory=1024, Disk=1024),