From 035f22abec2263a48770bffbe04e4cfdc443ff41 Mon Sep 17 00:00:00 2001 From: Daniel Kutik Date: Tue, 13 Dec 2022 12:34:23 +0100 Subject: [PATCH] pylint: remove unused imports Removed unused imports accross multiple files. Change-Id: Ib5ae4cebf9660e7339b11e3fa592d99f8d51e8d8 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354700 Tested-by: Daniel Kutik Reviewed-by: Mike Frysinger --- git_superproject.py | 2 +- gitc_utils.py | 1 - manifest_xml.py | 2 +- run_tests | 1 - subcmds/init.py | 6 ------ subcmds/manifest.py | 1 - subcmds/sync.py | 2 +- tests/test_git_superproject.py | 1 - 8 files changed, 3 insertions(+), 13 deletions(-) diff --git a/git_superproject.py b/git_superproject.py index 7a4ca16b..b5c262b4 100644 --- a/git_superproject.py +++ b/git_superproject.py @@ -31,7 +31,7 @@ from typing import NamedTuple from git_command import git_require, GitCommand from git_config import RepoConfig -from git_refs import R_HEADS, GitRefs +from git_refs import GitRefs _SUPERPROJECT_GIT_NAME = 'superproject.git' _SUPERPROJECT_MANIFEST_NAME = 'superproject_override.xml' diff --git a/gitc_utils.py b/gitc_utils.py index 486bbeb0..dfcfd2a4 100644 --- a/gitc_utils.py +++ b/gitc_utils.py @@ -14,7 +14,6 @@ import os import multiprocessing -import platform import re import sys import time diff --git a/manifest_xml.py b/manifest_xml.py index 129eb3f7..5b83f368 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -22,7 +22,7 @@ import xml.dom.minidom import urllib.parse import gitc_utils -from git_config import GitConfig, IsId +from git_config import GitConfig from git_refs import R_HEADS, HEAD from git_superproject import Superproject import platform_utils diff --git a/run_tests b/run_tests index 573dd446..5de51cf0 100755 --- a/run_tests +++ b/run_tests @@ -15,7 +15,6 @@ """Wrapper to run pytest with the right settings.""" -import errno import os import shutil import subprocess diff --git a/subcmds/init.py b/subcmds/init.py index 0c979cd4..d732374d 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -13,16 +13,10 @@ # limitations under the License. import os -import platform -import re import sys -import urllib.parse from color import Coloring from command import InteractiveCommand, MirrorSafeCommand -from error import ManifestParseError -from project import SyncBuffer -from git_config import GitConfig from git_command import git_require, MIN_GIT_VERSION_SOFT, MIN_GIT_VERSION_HARD from wrapper import Wrapper diff --git a/subcmds/manifest.py b/subcmds/manifest.py index 08905cb4..f4602a59 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py @@ -15,7 +15,6 @@ import json import os import sys -import optparse from command import PagedCommand diff --git a/subcmds/sync.py b/subcmds/sync.py index e4e7a971..8db429bf 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -55,7 +55,7 @@ import gitc_utils from project import Project from project import RemoteSpec from command import Command, DEFAULT_LOCAL_JOBS, MirrorSafeCommand, WORKER_BATCH_SIZE -from error import RepoChangedException, GitError, ManifestParseError +from error import RepoChangedException, GitError import platform_utils from project import SyncBuffer from progress import Progress diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py index 49295d83..0bdf1a4e 100644 --- a/tests/test_git_superproject.py +++ b/tests/test_git_superproject.py @@ -21,7 +21,6 @@ import tempfile import unittest from unittest import mock -from git_command import GitCommand import git_superproject import git_trace2_event_log import manifest_xml