From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] [PATCH] lint: clean up unused imports
Date: Mon, 5 Oct 2015 23:16:39 -0700 [thread overview]
Message-ID: <20151005231639.52e4d070.dolsen@gentoo.org> (raw)
In-Reply-To: <1444104350-15916-1-git-send-email-vapier@gentoo.org>
On Tue, 6 Oct 2015 00:05:50 -0400
Mike Frysinger <vapier@gentoo.org> wrote:
> Delete imports that the modules don't actually utilize.
> ---
> catalyst/base/resume.py | 2 --
> catalyst/fileops.py | 2 ++
> catalyst/targets/grp.py | 3 +--
> catalyst/targets/livecd_stage1.py | 3 +--
> catalyst/targets/livecd_stage2.py | 3 +--
> catalyst/targets/netboot2.py | 3 +--
> 6 files changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/catalyst/base/resume.py b/catalyst/base/resume.py
> index a03adf3..608f574 100644
> --- a/catalyst/base/resume.py
> +++ b/catalyst/base/resume.py
> @@ -12,8 +12,6 @@ set, unset, is_set, is_unset, enabled, clear_all
> '''
>
> import os
> -import shutil
> -from stat import ST_UID, ST_GID, ST_MODE
> import sys
> import traceback
>
> diff --git a/catalyst/fileops.py b/catalyst/fileops.py
> index 129d967..8a05985 100644
> --- a/catalyst/fileops.py
> +++ b/catalyst/fileops.py
> @@ -16,8 +16,10 @@ from stat import ST_UID, ST_GID, ST_MODE
>
> # NOTE: pjoin and listdir_files are imported here for export
> # to other catalyst modules
> +# pylint: disable=unused-import
> from snakeoil.osutils import (ensure_dirs as snakeoil_ensure_dirs,
> pjoin, listdir_files)
> +# pylint: enable=unused-import
> from catalyst.support import CatalystError
>
>
> diff --git a/catalyst/targets/grp.py b/catalyst/targets/grp.py
> index 5a10fff..4814ac6 100644
> --- a/catalyst/targets/grp.py
> +++ b/catalyst/targets/grp.py
> @@ -8,8 +8,7 @@ import types
> import glob
>
>
> -from catalyst.support import (CatalystError, normpath,
> - touch, cmd, list_bashify)
> +from catalyst.support import (CatalystError, normpath, cmd,
> list_bashify) from catalyst.fileops import ensure_dirs
> from catalyst.base.stagebase import StageBase
>
> diff --git a/catalyst/targets/livecd_stage1.py
> b/catalyst/targets/livecd_stage1.py index af59ed7..1930df1 100644
> --- a/catalyst/targets/livecd_stage1.py
> +++ b/catalyst/targets/livecd_stage1.py
> @@ -7,8 +7,7 @@ import os
> import types
>
>
> -from catalyst.support import (normpath,
> - touch, cmd)
> +from catalyst.support import (normpath, cmd)
> from catalyst.fileops import ensure_dirs
>
> from catalyst.base.stagebase import StageBase
> diff --git a/catalyst/targets/livecd_stage2.py
> b/catalyst/targets/livecd_stage2.py index 77c6613..870dcf9 100644
> --- a/catalyst/targets/livecd_stage2.py
> +++ b/catalyst/targets/livecd_stage2.py
> @@ -5,8 +5,7 @@ LiveCD stage2 target, builds upon previous LiveCD
> stage1 tarball
> import os
>
> -from catalyst.support import (normpath, file_locate, CatalystError,
> cmd,
> - read_from_clst, touch)
> +from catalyst.support import (normpath, file_locate, CatalystError,
> cmd) from catalyst.fileops import ensure_dirs
> from catalyst.base.stagebase import StageBase
>
> diff --git a/catalyst/targets/netboot2.py
> b/catalyst/targets/netboot2.py index 3305a2a..5de1a74 100644
> --- a/catalyst/targets/netboot2.py
> +++ b/catalyst/targets/netboot2.py
> @@ -8,8 +8,7 @@ import types
> import shutil
> from stat import ST_UID, ST_GID, ST_MODE
>
> -from catalyst.support import (CatalystError, normpath,
> - touch, cmd, list_bashify)
> +from catalyst.support import (CatalystError, normpath, cmd,
> list_bashify) from catalyst.fileops import ensure_dirs
>
> from catalyst.base.stagebase import StageBase
yeah, another one approved :)
and Thank you :)
--
Brian Dolbec <dolsen>
prev parent reply other threads:[~2015-10-06 6:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 4:05 [gentoo-catalyst] [PATCH] lint: clean up unused imports Mike Frysinger
2015-10-06 6:16 ` Brian Dolbec [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151005231639.52e4d070.dolsen@gentoo.org \
--to=dolsen@gentoo.org \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox