There was an error while loading. Please reload this page.
1 parent 163052c commit c3ba7b2Copy full SHA for c3ba7b2
1 file changed
src/mlx/warnings/code_quality.py
@@ -32,9 +32,9 @@ def fingerprint(self):
32
4. Step 3 is repeated until a unique hash is obtained.
33
"""
34
hashable_string = f"{self.severity}{self.path}{self.description}"
35
- new_hash = hashlib.md5(str(hashable_string).encode("utf-8")).hexdigest()
+ new_hash = hashlib.md5(str(hashable_string).encode("utf-8"), usedforsecurity=False).hexdigest()
36
while new_hash in self.fingerprints and self.fingerprints[new_hash] != self:
37
- new_hash = hashlib.md5(f"{hashable_string}{new_hash}".encode()).hexdigest()
+ new_hash = hashlib.md5(f"{hashable_string}{new_hash}".encode(), usedforsecurity=False).hexdigest()
38
type(self).fingerprints[new_hash] = self
39
return new_hash
40
0 commit comments