mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-04 10:39:50 +00:00
remove unused imports
This commit is contained in:
parent
820a927b06
commit
350393c9fd
20 changed files with 7 additions and 29 deletions
2
setup.py
2
setup.py
|
@ -11,7 +11,7 @@ except ImportError:
|
|||
multiprocessing = None
|
||||
|
||||
from setuptools.command.build_ext import build_ext
|
||||
from setuptools import setup, find_packages, Extension, Command
|
||||
from setuptools import setup, Extension, Command
|
||||
from setuptools.command.sdist import sdist
|
||||
|
||||
try:
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import base64
|
||||
import json
|
||||
import os
|
||||
import socket
|
||||
import stat
|
||||
import sys
|
||||
import time
|
||||
|
@ -32,7 +31,7 @@ from .helpers import HardLinkManager
|
|||
from .helpers import ChunkIteratorFileWrapper, open_item
|
||||
from .helpers import Error, IntegrityError, set_ec
|
||||
from .platform import uid2user, user2uid, gid2group, group2gid
|
||||
from .helpers import parse_timestamp, to_localtime
|
||||
from .helpers import parse_timestamp
|
||||
from .helpers import OutputTimestamp, format_timedelta, format_file_size, file_status, FileSize
|
||||
from .helpers import safe_encode, make_path_safe, remove_surrogates
|
||||
from .helpers import StableDict
|
||||
|
|
|
@ -6,7 +6,7 @@ import errno
|
|||
import os
|
||||
from collections import namedtuple
|
||||
|
||||
from .constants import CH_DATA, CH_ALLOC, CH_HOLE, MAX_DATA_SIZE, zeros
|
||||
from .constants import CH_DATA, CH_ALLOC, CH_HOLE, zeros
|
||||
|
||||
from libc.stdlib cimport free
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import configparser
|
||||
import hmac
|
||||
import os
|
||||
import textwrap
|
||||
|
@ -26,7 +25,7 @@ from ..item import Key, EncryptedKey, want_bytes
|
|||
from ..platform import SaveFile
|
||||
|
||||
from .nonces import NonceManager
|
||||
from .low_level import AES, bytes_to_long, long_to_bytes, bytes_to_int, num_cipher_blocks, hmac_sha256, blake2b_256, hkdf_hmac_sha512
|
||||
from .low_level import AES, bytes_to_int, num_cipher_blocks, hmac_sha256, blake2b_256, hkdf_hmac_sha512
|
||||
from .low_level import AES256_CTR_HMAC_SHA256, AES256_CTR_BLAKE2b, AES256_OCB, CHACHA20_POLY1305
|
||||
from . import low_level
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ from hashlib import sha256
|
|||
from ..helpers import Manifest, NoManifestError, Error, yes, bin_to_hex, dash_open
|
||||
from ..repository import Repository
|
||||
|
||||
from .key import CHPOKeyfileKey, KeyfileNotFoundError, RepoKeyNotFoundError, KeyBlobStorage, identify_key
|
||||
from .key import CHPOKeyfileKey, RepoKeyNotFoundError, KeyBlobStorage, identify_key
|
||||
|
||||
|
||||
class UnencryptedRepo(Error):
|
||||
|
|
|
@ -40,7 +40,6 @@ from math import ceil
|
|||
|
||||
from cpython cimport PyMem_Malloc, PyMem_Free
|
||||
from cpython.buffer cimport PyBUF_SIMPLE, PyObject_GetBuffer, PyBuffer_Release
|
||||
from cpython.bytes cimport PyBytes_FromStringAndSize
|
||||
|
||||
API_VERSION = '1.3_01'
|
||||
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from collections import namedtuple
|
||||
import locale
|
||||
import os
|
||||
|
||||
cimport cython
|
||||
from libc.stdint cimport uint32_t, UINT32_MAX, uint64_t
|
||||
from libc.errno cimport errno
|
||||
from libc.string cimport memcpy
|
||||
from cpython.exc cimport PyErr_SetFromErrnoWithFilename
|
||||
from cpython.buffer cimport PyBUF_SIMPLE, PyObject_GetBuffer, PyBuffer_Release
|
||||
from cpython.bytes cimport PyBytes_FromStringAndSize, PyBytes_CheckExact, PyBytes_GET_SIZE, PyBytes_AS_STRING
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from .errors import Error
|
||||
from ..platformflags import is_win32, is_linux, is_freebsd, is_darwin
|
||||
|
|
|
@ -20,7 +20,7 @@ logger = create_logger()
|
|||
from .errors import Error
|
||||
from .fs import get_keys_dir
|
||||
from .msgpack import Timestamp
|
||||
from .time import OutputTimestamp, format_time, to_localtime, safe_timestamp, safe_s
|
||||
from .time import OutputTimestamp, format_time, to_localtime, safe_timestamp
|
||||
from .. import __version__ as borg_version
|
||||
from .. import __version_tuple__ as borg_version_tuple
|
||||
from ..constants import * # NOQA
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import os
|
||||
import re
|
||||
import stat
|
||||
import subprocess
|
||||
|
||||
from .posix import posix_acl_use_stored_uid_gid
|
||||
from .posix import user2uid, group2gid
|
||||
|
@ -17,7 +16,6 @@ except ImportError:
|
|||
SYNC_FILE_RANGE_LOADED = False
|
||||
|
||||
from libc cimport errno
|
||||
from libc.stdint cimport int64_t
|
||||
|
||||
API_VERSION = '1.2_05'
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ import sys
|
|||
import sysconfig
|
||||
import tempfile
|
||||
import time
|
||||
import uuid
|
||||
import unittest
|
||||
|
||||
from ..xattr import get_all
|
||||
|
|
|
@ -35,7 +35,6 @@ from ..archiver import Archiver, parse_storage_quota, PURE_PYTHON_MSGPACK_WARNIN
|
|||
from ..cache import Cache, LocalCache
|
||||
from ..chunker import has_seek_hole
|
||||
from ..constants import * # NOQA
|
||||
from ..crypto.low_level import bytes_to_long, num_cipher_blocks
|
||||
from ..crypto.key import FlexiKey, AESOCBRepoKey, AESOCBKeyfileKey, CHPOKeyfileKey, Passphrase, TAMRequiredError
|
||||
from ..crypto.keymanager import RepoIdMismatch, NotABorgKeyFile
|
||||
from ..crypto.file_integrity import FileIntegrityError
|
||||
|
@ -43,7 +42,6 @@ from ..helpers import Location, get_security_dir
|
|||
from ..helpers import Manifest, MandatoryFeatureUnsupported
|
||||
from ..helpers import EXIT_SUCCESS, EXIT_WARNING, EXIT_ERROR
|
||||
from ..helpers import bin_to_hex
|
||||
from ..helpers import MAX_S
|
||||
from ..helpers import msgpack
|
||||
from ..helpers import flags_noatime, flags_normal
|
||||
from ..nanorst import RstToTextLazy, rst_to_terminal
|
||||
|
|
|
@ -9,7 +9,6 @@ import tempfile
|
|||
import zlib
|
||||
|
||||
from ..hashindex import NSIndex, ChunkIndex, ChunkIndexEntry
|
||||
from .. import hashindex
|
||||
from ..crypto.file_integrity import IntegrityCheckedFile, FileIntegrityError
|
||||
from . import BaseTestCase, unopened_tempfile
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import sys
|
|||
from argparse import ArgumentTypeError
|
||||
from datetime import datetime, timezone, timedelta
|
||||
from io import StringIO, BytesIO
|
||||
from time import sleep
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import getpass
|
||||
import os.path
|
||||
import re
|
||||
import tempfile
|
||||
from binascii import hexlify, unhexlify, a2b_base64
|
||||
|
@ -15,12 +13,10 @@ from ..crypto.key import Blake2AESOCBRepoKey, Blake2AESOCBKeyfileKey, Blake2CHPO
|
|||
from ..crypto.key import ID_HMAC_SHA_256, ID_BLAKE2b_256
|
||||
from ..crypto.key import TAMRequiredError, TAMInvalid, TAMUnsupportedSuiteError, UnsupportedManifestError, UnsupportedKeyFormatError
|
||||
from ..crypto.key import identify_key
|
||||
from ..crypto.low_level import bytes_to_long
|
||||
from ..crypto.low_level import IntegrityError as IntegrityErrorBase
|
||||
from ..helpers import IntegrityError
|
||||
from ..helpers import Location
|
||||
from ..helpers import StableDict
|
||||
from ..helpers import get_security_dir
|
||||
from ..helpers import msgpack
|
||||
from ..constants import KEY_ALGORITHMS
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ from traceback import format_exc
|
|||
|
||||
import pytest
|
||||
|
||||
from ..helpers import daemonize
|
||||
from ..platform import get_process_id, process_alive
|
||||
from ..locking import TimeoutTimer, ExclusiveLock, Lock, LockRoster, \
|
||||
ADD, REMOVE, SHARED, EXCLUSIVE, LockTimeout, NotLocked, NotMyLock
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import functools
|
||||
import os
|
||||
import random
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
|
|
|
@ -13,7 +13,7 @@ from ..helpers import Location
|
|||
from ..helpers import IntegrityError
|
||||
from ..helpers import msgpack
|
||||
from ..locking import Lock, LockFailed
|
||||
from ..remote import RemoteRepository, InvalidRPCMethod, PathNotAllowed, ConnectionClosedWithHint, handle_remote_line
|
||||
from ..remote import RemoteRepository, InvalidRPCMethod, PathNotAllowed, handle_remote_line
|
||||
from ..repository import Repository, LoggedIO, MAGIC, MAX_DATA_SIZE, TAG_DELETE, TAG_PUT2, TAG_PUT, TAG_COMMIT
|
||||
from . import BaseTestCase
|
||||
from .hashindex import H
|
||||
|
|
Loading…
Add table
Reference in a new issue