scripts: Remove pylint
pylint has been a great tool to get the initial code base into shape but since then we mostely false postives. All those warnings needed to be annonated. This allong wouldn't be reason enough to remove it. The main problem is that the pylint version on gitlab is updated in the back and suddenly we get new warnings which are bogus. Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
This commit is contained in:
@@ -72,7 +72,6 @@ class Build:
|
||||
"""
|
||||
Executes the build command of the kas plugin.
|
||||
"""
|
||||
# pylint: disable=no-self-use
|
||||
|
||||
if args.cmd != 'build':
|
||||
return False
|
||||
|
@@ -70,7 +70,6 @@ class Config:
|
||||
"""
|
||||
Returns the list of repos.
|
||||
"""
|
||||
# pylint: disable=no-self-use
|
||||
|
||||
# Always keep repo_dict and repos synchronous
|
||||
# when calling get_repos
|
||||
|
@@ -44,7 +44,6 @@ except ImportError:
|
||||
platform.dist is deprecated and will be removed in python 3.7
|
||||
Use the 'distro' package instead.
|
||||
"""
|
||||
# pylint: disable=deprecated-method
|
||||
return platform.dist()[0]
|
||||
|
||||
|
||||
@@ -55,7 +54,6 @@ def create_global_context():
|
||||
"""
|
||||
Creates global context as singleton.
|
||||
"""
|
||||
# pylint: disable=global-statement
|
||||
global __context__
|
||||
__context__ = Context()
|
||||
return __context__
|
||||
@@ -68,7 +66,6 @@ def get_context():
|
||||
return __context__
|
||||
|
||||
|
||||
# pylint: disable=too-many-instance-attributes
|
||||
class Context:
|
||||
"""
|
||||
Implements the kas build context.
|
||||
|
@@ -164,7 +164,6 @@ class IncludeHandler:
|
||||
the current file overwrites every include. (evaluation depth first
|
||||
and from top to bottom)
|
||||
"""
|
||||
# pylint: disable=too-many-arguments
|
||||
|
||||
missing_repos = []
|
||||
configs = []
|
||||
|
@@ -47,7 +47,6 @@ from . import __version__, __file_version__, __compatible_file_version__
|
||||
# Import kas plugins
|
||||
# Since they are added by decorators, they don't need to be called,
|
||||
# just imported.
|
||||
# pylint: disable=unused-import
|
||||
from .libkas import kasplugin
|
||||
from . import build
|
||||
from . import shell
|
||||
@@ -155,7 +154,6 @@ def main():
|
||||
"""
|
||||
The main function that operates as a wrapper around kas.
|
||||
"""
|
||||
# pylint: disable=broad-except
|
||||
|
||||
try:
|
||||
sys.exit(kas(sys.argv[1:]))
|
||||
|
@@ -281,7 +281,6 @@ class SetupReposStep(Command):
|
||||
|
||||
def execute(self, ctx):
|
||||
""" TODO refactor protected-access """
|
||||
# pylint: disable=protected-access
|
||||
if not ctx.missing_repo_names:
|
||||
return False
|
||||
|
||||
@@ -325,7 +324,6 @@ class FinishSetupRepos(Command):
|
||||
|
||||
def execute(self, ctx):
|
||||
""" TODO refactor protected-access """
|
||||
# pylint: disable=protected-access
|
||||
# now fetch everything with complete config and check out layers
|
||||
# except if keep_config is set
|
||||
if not ctx.keep_config:
|
||||
|
@@ -87,11 +87,6 @@ def run_cmd_async(cmd, cwd, env=None, fail=True, liveupdate=True):
|
||||
"""
|
||||
Run a command asynchronously.
|
||||
"""
|
||||
# pylint: disable=too-many-arguments
|
||||
|
||||
# Disable incorrect warning on asyncio.wait_for,
|
||||
# https://github.com/PyCQA/pylint/issues/996.
|
||||
# pylint: disable=not-an-iterable
|
||||
|
||||
env = env or get_context().environ
|
||||
cmdstr = ' '.join(cmd)
|
||||
@@ -136,7 +131,6 @@ def run_cmd(cmd, cwd, env=None, fail=True, liveupdate=True):
|
||||
"""
|
||||
Runs a command synchronously.
|
||||
"""
|
||||
# pylint: disable=too-many-arguments
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
(ret, output) = loop.run_until_complete(
|
||||
@@ -164,7 +158,6 @@ def _create_task(routine):
|
||||
# for Python < 3.5, avoiding the keyword 'async' introduced in 3.7
|
||||
creation_func = getattr(asyncio, 'async')
|
||||
|
||||
# pylint: disable=deprecated-method
|
||||
return creation_func(routine)
|
||||
|
||||
|
||||
@@ -204,7 +197,6 @@ def get_build_environ():
|
||||
"""
|
||||
Creates the build environment variables.
|
||||
"""
|
||||
# pylint: disable=too-many-locals
|
||||
# nasty side effect function: running oe/isar-init-build-env also
|
||||
# creates the conf directory
|
||||
|
||||
|
@@ -41,7 +41,6 @@ class Repo:
|
||||
|
||||
def __init__(self, url, path, refspec, layers, patches,
|
||||
disable_operations):
|
||||
# pylint: disable=too-many-arguments
|
||||
self.url = url
|
||||
self.path = path
|
||||
self.refspec = refspec
|
||||
@@ -51,7 +50,6 @@ class Repo:
|
||||
self.operations_disabled = disable_operations
|
||||
|
||||
def __getattr__(self, item):
|
||||
# pylint: disable=no-else-return
|
||||
if item == 'layers':
|
||||
if not self._layers:
|
||||
return [self.path]
|
||||
@@ -256,7 +254,6 @@ class RepoImpl(Repo):
|
||||
(retc, output) = yield from run_cmd_async(cmd,
|
||||
cwd=self.path,
|
||||
fail=False)
|
||||
# pylint: disable=no-else-return
|
||||
if retc:
|
||||
logging.error('Could not apply patch. Please fix repos and '
|
||||
'patches. (patch path: %s, repo: %s, patch '
|
||||
@@ -274,7 +271,6 @@ class GitRepo(RepoImpl):
|
||||
"""
|
||||
Provides the git functionality for a Repo.
|
||||
"""
|
||||
# pylint: disable=no-self-use,missing-docstring
|
||||
|
||||
def clone_cmd(self, gitsrcdir):
|
||||
cmd = ['git', 'clone', '-q', self.url, self.path]
|
||||
@@ -310,7 +306,6 @@ class MercurialRepo(RepoImpl):
|
||||
"""
|
||||
Provides the hg functionality for a Repo.
|
||||
"""
|
||||
# pylint: disable=no-self-use,missing-docstring,unused-argument
|
||||
|
||||
def clone_cmd(self, gitsrcdir, config):
|
||||
return ['hg', 'clone', self.url, self.path]
|
||||
|
@@ -70,7 +70,6 @@ class Shell:
|
||||
"""
|
||||
Runs this kas plugin
|
||||
"""
|
||||
# pylint: disable= no-self-use
|
||||
|
||||
if args.cmd != 'shell':
|
||||
return False
|
||||
|
Reference in New Issue
Block a user