Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Resolve #1506] Remove unused __eq__ method #1508

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions sceptre/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,30 +354,6 @@ def __repr__(self):
def __str__(self):
return self.name

def __eq__(self, stack):
# We should not use any resolvable properties in __eq__, since it is used when adding the
# Stack to a set, which is done very early in plan resolution. Trying to reference resolvers
# before the plan is fully resolved can potentially blow up.
return (
self.name == stack.name
and self.external_name == stack.external_name
and self.project_code == stack.project_code
and self.template_path == stack.template_path
and self.region == stack.region
and self.template_key_prefix == stack.template_key_prefix
and self.required_version == stack.required_version
and self.sceptre_role_session_duration
== stack.sceptre_role_session_duration
and self.profile == stack.profile
and self.dependencies == stack.dependencies
and self.protected == stack.protected
and self.on_failure == stack.on_failure
and self.disable_rollback == stack.disable_rollback
and self.stack_timeout == stack.stack_timeout
and self.ignore == stack.ignore
and self.obsolete == stack.obsolete
)

def __hash__(self):
return hash(str(self))

Expand Down