forked from mirrors/thatmattlove-hyperglass
fix zip error
This commit is contained in:
parent
63611311da
commit
43faa0f8e4
2 changed files with 2 additions and 3 deletions
|
|
@ -118,9 +118,7 @@ class HyperglassUniqueModel(HyperglassModel):
|
|||
|
||||
def __hash__(self: "HyperglassUniqueModel") -> int:
|
||||
"""Create a hashed representation of this model's name."""
|
||||
fields = dict(
|
||||
zip(self._unique_fields, (getattr(self, f) for f in self._unique_fields), strict=True)
|
||||
)
|
||||
fields = dict(zip(self._unique_fields, (getattr(self, f) for f in self._unique_fields)))
|
||||
return hash(json.dumps(fields))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ ignore = [
|
|||
"D418", # No docstring on overloaded functions.
|
||||
"N818", # Error suffix on custom exceptions.
|
||||
"RET501", # Explicitly return None
|
||||
"B905", # zip without `strict`
|
||||
]
|
||||
line-length = 100
|
||||
select = ["B", "C", "D", "E", "F", "I", "N", "S", "RET", "W"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue