Skip to content

Commit 2f41347

Browse files
author
Noah
authored
fix: declare attrs dependency (#88)
1 parent 57e02e1 commit 2f41347

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
python_requires = "~=3.6"
1111
setup_requires = ["setuptools_scm"]
12-
install_requires = ["colored", "typing_extensions>=3.6"]
12+
install_requires = ["attrs>=18.2.0", "colored", "typing_extensions>=3.6"]
1313
dev_requires = [
1414
"black",
1515
"codecov",

src/syrupy/assertion.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ class SnapshotAssertion:
4949
_serializer_class: Type["AbstractSnapshotSerializer"] = attr.ib(kw_only=True)
5050
_test_location: "TestLocation" = attr.ib(kw_only=True)
5151
_update_snapshots: bool = attr.ib(kw_only=True)
52-
_executions: int = attr.ib(init=False, default=0)
53-
_execution_results: Dict[int, "AssertionResult"] = attr.ib(init=False, factory=dict)
52+
_executions: int = attr.ib(init=False, default=0, kw_only=True)
53+
_execution_results: Dict[int, "AssertionResult"] = attr.ib(
54+
init=False, factory=dict, kw_only=True
55+
)
5456

5557
def __attrs_post_init__(self) -> None:
5658
self._session.register_request(self)

src/syrupy/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class SnapshotUnknown(Snapshot):
3434
name: str = attr.ib(default=SNAPSHOT_UNKNOWN_FILE_KEY, init=False)
3535

3636

37-
@attr.s(eq=False)
37+
@attr.s
3838
class SnapshotFile(object):
3939
filepath: str = attr.ib()
4040
_snapshots: Dict[str, "Snapshot"] = attr.ib(factory=dict)

0 commit comments

Comments
 (0)