alitheg commented on code in PR #1032:
URL:
https://github.com/apache/tooling-trusted-releases/pull/1032#discussion_r3031922067
##########
atr/models/safe.py:
##########
@@ -57,6 +57,9 @@ def __init__(self, value: str) -> None:
def __bool__(self) -> bool:
return True
+ def __fspath__(self) -> str:
Review Comment:
Aha, ok so I was looking at it as making every safe type a valid path
component - which currently they are in certain bounds, since we use projectkey
etc as part of our storage paths. I can see the flip side though. I wonder if
there's a safer way to enable `StatePath / ProjectKey / VersionKey /
RevisionNumber` (ie. just using `__truediv__`) without having to `str` all the
args individually, which is what I was going for
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]