If name set as string and longname not set there is exception in this part of code TypeError: can't concat str to bytes
|
name.longname = detail.encode('utf-8') + cast(bytes, name.filename) |
In CPython cast do nothing
https://github.com/python/cpython/blob/1af025dd2206eecee3ee6242f2a7cdb67173fb97/Lib/typing.py#L2369-L2377
I suggest remove union types BytesOrStr as bytes always used in input params.
If name set as string and longname not set there is exception in this part of code
TypeError: can't concat str to bytesasyncssh/asyncssh/sftp.py
Line 7163 in 5972676
In CPython
castdo nothinghttps://github.com/python/cpython/blob/1af025dd2206eecee3ee6242f2a7cdb67173fb97/Lib/typing.py#L2369-L2377
I suggest remove union types BytesOrStr as bytes always used in input params.