Skip to content

Commit ba2ace1

Browse files
committed
Fixup formatting.
1 parent 9c2d0ff commit ba2ace1

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

python/pytest-selfie/pytest_selfie/plugin.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
from collections import defaultdict
3-
from typing import ByteString, DefaultDict, Iterator, List, Optional
3+
from collections.abc import ByteString, Iterator
4+
from typing import Optional
45

56
import pytest
67
from selfie_lib import (
@@ -92,7 +93,7 @@ def walk_callback(walk: Iterator[TypedPath]) -> bool:
9293

9394
@pytest.hookimpl
9495
def pytest_collection_modifyitems(
95-
session: pytest.Session, config: pytest.Config, items: List[pytest.Item]
96+
session: pytest.Session, config: pytest.Config, items: list[pytest.Item]
9697
) -> None:
9798
settings = SelfieSettingsAPI(config)
9899
system = PytestSnapshotSystem(settings)
@@ -152,7 +153,7 @@ def __init__(self, settings: SelfieSettingsAPI):
152153
self.__inline_write_tracker = InlineWriteTracker()
153154
self.__toBeFileWriteTracker = ToBeFileWriteTracker()
154155

155-
self.__progress_per_file: DefaultDict[TypedPath, SnapshotFileProgress] = (
156+
self.__progress_per_file: defaultdict[TypedPath, SnapshotFileProgress] = (
156157
_keydefaultdict(lambda key: SnapshotFileProgress(self, key)) # type: ignore
157158
) # type: ignore
158159
# the test which is running right now, if any
@@ -249,7 +250,9 @@ def write_to_be_file(
249250
self, path: TypedPath, data: "ByteString", call: CallStack
250251
) -> None:
251252
# Directly write to disk using ToBeFileWriteTracker
252-
self.__toBeFileWriteTracker.writeToDisk(path, bytes(data), call, self.layout_pytest)
253+
self.__toBeFileWriteTracker.writeToDisk(
254+
path, bytes(data), call, self.layout_pytest
255+
)
253256

254257

255258
class DiskStoragePytest(DiskStorage):
@@ -469,6 +472,6 @@ def pytest_addoption(parser):
469472
parser.addini("HELLO", "Dummy pytest.ini setting")
470473

471474

472-
@pytest.fixture()
475+
@pytest.fixture
473476
def bar(request):
474477
return request.config.option.dest_foo

0 commit comments

Comments
 (0)