Skip to content

Commit

Permalink
fix: declare attrs dependency (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah committed Jan 7, 2020
1 parent 57e02e1 commit 2f41347
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

python_requires = "~=3.6"
setup_requires = ["setuptools_scm"]
install_requires = ["colored", "typing_extensions>=3.6"]
install_requires = ["attrs>=18.2.0", "colored", "typing_extensions>=3.6"]
dev_requires = [
"black",
"codecov",
Expand Down
6 changes: 4 additions & 2 deletions src/syrupy/assertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ class SnapshotAssertion:
_serializer_class: Type["AbstractSnapshotSerializer"] = attr.ib(kw_only=True)
_test_location: "TestLocation" = attr.ib(kw_only=True)
_update_snapshots: bool = attr.ib(kw_only=True)
_executions: int = attr.ib(init=False, default=0)
_execution_results: Dict[int, "AssertionResult"] = attr.ib(init=False, factory=dict)
_executions: int = attr.ib(init=False, default=0, kw_only=True)
_execution_results: Dict[int, "AssertionResult"] = attr.ib(
init=False, factory=dict, kw_only=True
)

def __attrs_post_init__(self) -> None:
self._session.register_request(self)
Expand Down
2 changes: 1 addition & 1 deletion src/syrupy/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SnapshotUnknown(Snapshot):
name: str = attr.ib(default=SNAPSHOT_UNKNOWN_FILE_KEY, init=False)


@attr.s(eq=False)
@attr.s
class SnapshotFile(object):
filepath: str = attr.ib()
_snapshots: Dict[str, "Snapshot"] = attr.ib(factory=dict)
Expand Down

0 comments on commit 2f41347

Please sign in to comment.