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 2677a6e commit 474ef9eCopy full SHA for 474ef9e
pytensor/utils.py
@@ -202,9 +202,8 @@ def hash_from_code(msg: str | bytes) -> str:
202
# but Python 3 (unicode) strings don't.
203
if isinstance(msg, str):
204
msg = msg.encode()
205
- # Python 3 does not like module names that start with
206
- # a digit.
207
- 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()}"
208
209
210
def uniq(seq: Sequence) -> list:
0 commit comments