mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-28 23:00:12 +03:00
fix(typing): resolve mypy errors in utils.zipfile_zstd
This commit is contained in:
parent
8df25dec32
commit
3fc1d27937
@ -2,7 +2,7 @@
|
||||
from . import _zipfile
|
||||
|
||||
from zipfile import *
|
||||
from zipfile import (
|
||||
from ._zipfile import (
|
||||
ZIP_ZSTANDARD,
|
||||
ZSTANDARD_VERSION,
|
||||
)
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
import zipfile
|
||||
import zipfile as _zipfile_module
|
||||
import zstandard as zstd
|
||||
import inspect
|
||||
from typing import Any
|
||||
|
||||
from ._patcher import patch
|
||||
|
||||
zipfile: Any = _zipfile_module
|
||||
|
||||
zipfile.ZIP_ZSTANDARD = 93
|
||||
ZIP_ZSTANDARD = 93
|
||||
ZSTANDARD_VERSION = 20
|
||||
|
||||
zipfile.ZIP_ZSTANDARD = ZIP_ZSTANDARD
|
||||
zipfile.compressor_names[zipfile.ZIP_ZSTANDARD] = "zstandard"
|
||||
zipfile.ZSTANDARD_VERSION = 20
|
||||
zipfile.ZSTANDARD_VERSION = ZSTANDARD_VERSION
|
||||
|
||||
|
||||
@patch(zipfile, "_check_compression")
|
||||
|
||||
@ -427,8 +427,6 @@ module = [
|
||||
"gns3server.utils.images", # 4
|
||||
"gns3server.utils.packet_filter_validation", # 16
|
||||
"gns3server.utils.websocket_to_websocket", # 12
|
||||
"gns3server.utils.zipfile_zstd", # 2
|
||||
"gns3server.utils.zipfile_zstd._patcher", # 1
|
||||
"gns3server.utils.zipfile_zstd._zipfile", # 5
|
||||
]
|
||||
ignore_errors = true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user