[BUG]misidentification Unexpected type
已回答
Version : PC-233.11799.259
My code:
…
partname = os.path.basename(file).replace('.new.dat.1', '')
filepath = os.path.dirname(file)
c = os.path.join(filepath, partname + ".img")
…
then Unexpected type:(str | bytes | LiteralString | Any, LiteralString | str | bytes)Possible types:(LiteralString, LiteralString)(str | PathLike[str], str | PathLike[str])(bytes | PathLike[bytes], bytes | PathLike[bytes])(LiteralString, LiteralString)(str | PathLike[str], str | PathLike[str])(bytes | PathLike[bytes], bytes | PathLike[bytes])
请先登录再写评论。
Looks like it's a false positive and is reproducible only on the 2023.3 - I created a new bug report - https://youtrack.jetbrains.com/issue/PY-65191/False-positive-for-os.path-on-2023.3-Unexpected-types