mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-25 11:22:26 +02:00
Merge pull request #2894 from markparonyan/mypy-utils-zipfile-zstd
fix(typing): resolve mypy errors in utils.zipfile_zstd
This commit is contained in:
commit
71965e0e81
@ -2,7 +2,7 @@
|
|||||||
from . import _zipfile
|
from . import _zipfile
|
||||||
|
|
||||||
from zipfile import *
|
from zipfile import *
|
||||||
from zipfile import (
|
from ._zipfile import (
|
||||||
ZIP_ZSTANDARD,
|
ZIP_ZSTANDARD,
|
||||||
ZSTANDARD_VERSION,
|
ZSTANDARD_VERSION,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,13 +1,18 @@
|
|||||||
import zipfile
|
import zipfile as _zipfile_module
|
||||||
import zstandard as zstd
|
import zstandard as zstd
|
||||||
import inspect
|
import inspect
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from ._patcher import patch
|
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.compressor_names[zipfile.ZIP_ZSTANDARD] = "zstandard"
|
||||||
zipfile.ZSTANDARD_VERSION = 20
|
zipfile.ZSTANDARD_VERSION = ZSTANDARD_VERSION
|
||||||
|
|
||||||
|
|
||||||
@patch(zipfile, "_check_compression")
|
@patch(zipfile, "_check_compression")
|
||||||
|
|||||||
@ -417,8 +417,6 @@ module = [
|
|||||||
"gns3server.utils.images", # 4
|
"gns3server.utils.images", # 4
|
||||||
"gns3server.utils.packet_filter_validation", # 16
|
"gns3server.utils.packet_filter_validation", # 16
|
||||||
"gns3server.utils.websocket_to_websocket", # 12
|
"gns3server.utils.websocket_to_websocket", # 12
|
||||||
"gns3server.utils.zipfile_zstd", # 2
|
|
||||||
"gns3server.utils.zipfile_zstd._patcher", # 1
|
"gns3server.utils.zipfile_zstd._patcher", # 1
|
||||||
"gns3server.utils.zipfile_zstd._zipfile", # 5
|
|
||||||
]
|
]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user