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
importioimportzipfileclassMockBinaryFile(io.BytesIO):
def__init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
defclose(self):
pass# Don't allow closing the file, it would clear the bufferzip_buffer=MockBinaryFile()
withzipfile.ZipFile(zip_buffer, "w") aszf:
zf.writestr("dir/file.txt", "This is a test")
# Reset the BytesIO object's cursor to the start.zip_buffer.seek(0)
withzipfile.ZipFile(zip_buffer, "r") aszf:
zpath=zipfile.Path(zf, "/")
dir_name, file_name=zpath.at.split("/")
> ruff --select=PD008 a.py
a.py:24:23: PD008 Use `.loc` instead of `.at`. If speed is important, use numpy.
|
24 | dir_name, file_name = zpath.at.split("/")
| ^^^^^^^^ PD008
|
Found 1 error.
The text was updated successfully, but these errors were encountered:
ruff==0.0.267
has a false positivePD008
:The text was updated successfully, but these errors were encountered: