You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
results in TypeError: unsupported operand type(s) for +: 'SecretStr' and 'str'
using f-string notation also doesn't work nicely:
header=f"{type}{body}"
you don't get an error doing this, but the resulting type of header will be str and will be set to 'bearer **********'. The resulting str also seems to be 'broken' in that you can't run type against it for example.
Long story short, we should make 'adding' things (prefixing of suffixes) something to a given SecretStr easy as well.
The text was updated successfully, but these errors were encountered:
We should create a custom SecretStr implementation that plays a bit nicer with str operations, but that's up for debate.
For example, this code would throw an error:
results in
TypeError: unsupported operand type(s) for +: 'SecretStr' and 'str'
using f-string notation also doesn't work nicely:
you don't get an error doing this, but the resulting type of header will be str and will be set to
'bearer **********'
. The resulting str also seems to be 'broken' in that you can't run type against it for example.Long story short, we should make 'adding' things (prefixing of suffixes) something to a given SecretStr easy as well.
The text was updated successfully, but these errors were encountered: