Skip to content

Commit

Permalink
Cleanup custom check overhead (#1625)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Nov 5, 2020
1 parent 1a0437b commit 445e8ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 445e8ac

Please sign in to comment.