* [gentoo-catalyst] [PATCH] lint: clean up unused imports
@ 2015-10-06 4:05 Mike Frysinger
2015-10-06 6:16 ` Brian Dolbec
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2015-10-06 4:05 UTC (permalink / raw
To: gentoo-catalyst
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
--
2.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-catalyst] [PATCH] lint: clean up unused imports
2015-10-06 4:05 [gentoo-catalyst] [PATCH] lint: clean up unused imports Mike Frysinger
@ 2015-10-06 6:16 ` Brian Dolbec
0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2015-10-06 6:16 UTC (permalink / raw
To: gentoo-catalyst
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-06 6:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 4:05 [gentoo-catalyst] [PATCH] lint: clean up unused imports Mike Frysinger
2015-10-06 6:16 ` Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox