Skip to content

Commit

Permalink
chore: remove unnecessary quotes in type annotations (#920)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Nov 13, 2024
1 parent 39d2bba commit 7b97d2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/syrupy/assertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ def _assert(self, data: "SerializableData") -> bool:
snapshot_name = self.extension.get_snapshot_name(
test_location=self.test_location, index=self.index
)
snapshot_data: Optional["SerializedData"] = None
serialized_data: Optional["SerializedData"] = None
snapshot_data: Optional[SerializedData] = None
serialized_data: Optional[SerializedData] = None
matches = False
assertion_success = False
assertion_exception = None
Expand Down
4 changes: 2 additions & 2 deletions src/syrupy/extensions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def discover_snapshots(
"""
Returns all snapshot collections in test site
"""
discovered: "SnapshotCollections" = SnapshotCollections()
discovered = SnapshotCollections()
for filepath in walk_snapshot_dir(self.dirname(test_location=test_location)):
if self.is_snapshot_location(location=filepath):
snapshot_collection = self._read_snapshot_collection(
Expand Down Expand Up @@ -315,7 +315,7 @@ def __diff_lines(self, a: str, b: str) -> Iterator[str]:
yield from map(context_style, self.__limit_context(line.c))

def __diffed_lines(self, a: str, b: str) -> Iterator["DiffedLine"]:
staged_diffed_line: Optional["DiffedLine"] = None
staged_diffed_line: Optional[DiffedLine] = None
for line in qdiff(a.splitlines(keepends=True), b.splitlines(keepends=True)):
is_context_line = line[0] == " "
is_snapshot_line = line[0] == "-"
Expand Down
2 changes: 1 addition & 1 deletion src/syrupy/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def _diff_snapshot_collections(
{A{1,2}, B{3,4}, D{7,8}} will result in a collection with the contents
{A{}, B{}, C{5,6}}.
"""
diffed_snapshot_collections: "SnapshotCollections" = SnapshotCollections()
diffed_snapshot_collections = SnapshotCollections()
for snapshot_collection1 in snapshot_collections1:
snapshot_collection2 = snapshot_collections2.get(
snapshot_collection1.location
Expand Down

0 comments on commit 7b97d2a

Please sign in to comment.