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
There is code present to convert any non-Str values passed in into Str; however, I don't think this part of the code can ever be reached. Example:
>>> from slugify import slugify
>>> slugify(123)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\CodyC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\slugify\slugify.py", line 95, in slugify
text = str(text, 'utf-8', 'ignore')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: decoding to str: need a bytes-like object, int found
>>> slugify('123')
'123'
The text was updated successfully, but these errors were encountered:
Ah, the good old days when this module lacked typings and supported both Python 2.7 and 3+. Now, with the typing of text: str, it's required that the caller passes in a string.
Some parts of the code might need pruning; however, the module is very stable. Rocking the boat is not part of the plan moving forward. Thanks.
There is code present to convert any non-Str values passed in into Str; however, I don't think this part of the code can ever be reached. Example:
The text was updated successfully, but these errors were encountered: