We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 395189c commit 03a70fdCopy full SHA for 03a70fd
pytensor/utils.py
@@ -201,9 +201,8 @@ def hash_from_code(msg: str | bytes) -> str:
201
# but Python 3 (unicode) strings don't.
202
if isinstance(msg, str):
203
msg = msg.encode()
204
- # Python 3 does not like module names that start with
205
- # a digit.
206
- return "m" + hashlib.sha256(msg).hexdigest()
+ # Python 3 does not like module names that start with a digit.
+ return f"m{hashlib.sha256(msg).hexdigest()}"
207
208
209
def uniq(seq: Sequence) -> list:
0 commit comments