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

Cleanup custom check overhead #1625

Merged
merged 3 commits into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion custom_components/hacs/helpers/properties/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class RepositoryPropertyCustom(ABC):
@property
def custom(self):
"""Return flag if the repository is custom."""
if str(self.data.id) in [str(x) for x in self.hacs.common.default]:
if str(self.data.id) in self.hacs.common.default:
return False
if self.data.full_name == "hacs/integration":
return False
Expand Down
2 changes: 1 addition & 1 deletion tests/repositories/helpers/test_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_repository_helpers_properties_custom():
assert repository.custom

repository.data.id = 1337
repository.hacs.common.default.append(repository.data.id)
repository.hacs.common.default.append(str(repository.data.id))
assert not repository.custom

repository.hacs.common.default = []
Expand Down