diff options
| author | Virgil Dupras <hsoft@hardcoded.net> | 2018-08-14 11:32:05 -0400 |
|---|---|---|
| committer | Virgil Dupras <hsoft@hardcoded.net> | 2018-08-14 11:32:05 -0400 |
| commit | 8d0df18f0275376a5c7e6c133abaa99e7c05b737 (patch) | |
| tree | 21a4c9131d67d3b180a165416fdbd2928d60a805 /pym | |
| parent | 23368d93037c7134847e99ff9772e2e2fbc9daa3 (diff) | |
| download | gentoolkit-8d0df18f0275376a5c7e6c133abaa99e7c05b737.tar.gz | |
Remove pylint
As of now, pylint checks return a metric ton of warnings, which tells us
that it hasn't been running lately. pylint is replaced by flake8 and its
continuous run will enventually be ensured by a CI running tox on this
project. The immediate goal, for now, is to have an easy command that
checks as much as possible, but that *passes* so that we don't litter
the project with more code that decrease quality.
Diffstat (limited to 'pym')
| -rw-r--r-- | pym/gentoolkit/atom.py | 6 | ||||
| -rw-r--r-- | pym/gentoolkit/ekeyword/.pylintrc | 36 | ||||
| -rwxr-xr-x | pym/gentoolkit/ekeyword/ekeyword.py | 1 | ||||
| -rwxr-xr-x | pym/gentoolkit/ekeyword/ekeyword_unittest.py | 2 | ||||
| -rwxr-xr-x | pym/gentoolkit/ekeyword/pylint | 49 | ||||
| -rw-r--r-- | pym/gentoolkit/enalyze/output.py | 6 | ||||
| -rw-r--r-- | pym/gentoolkit/equery/belongs.py | 2 | ||||
| -rw-r--r-- | pym/gentoolkit/equery/depends.py | 2 | ||||
| -rw-r--r-- | pym/gentoolkit/equery/files.py | 2 | ||||
| -rw-r--r-- | pym/gentoolkit/equery/meta.py | 6 | ||||
| -rw-r--r-- | pym/gentoolkit/helpers.py | 2 | ||||
| -rw-r--r-- | pym/gentoolkit/pprinter.py | 4 |
12 files changed, 0 insertions, 118 deletions
diff --git a/pym/gentoolkit/atom.py b/pym/gentoolkit/atom.py index 7282fac..9d8a558 100644 --- a/pym/gentoolkit/atom.py +++ b/pym/gentoolkit/atom.py @@ -188,9 +188,6 @@ class Atom(portage.dep.Atom, CPV): def __setattr__(self, name, value): object.__setattr__(self, name, value) - #R0911:121:Atom.intersects: Too many return statements (20/6) - #R0912:121:Atom.intersects: Too many branches (23/12) - # pylint: disable-msg=R0911,R0912 def intersects(self, other): """Check if a passed in package atom "intersects" this atom. @@ -292,9 +289,6 @@ class Atom(portage.dep.Atom, CPV): # If we get here at least one of us is a <, <=, > or >=: if self.operator in ('<', '<=', '>', '>='): - # pylint screwup: - # E0601: Using variable 'ranged' before assignment - # pylint: disable-msg=E0601 ranged, ranged.operator = self, self.operator else: ranged, ranged.operator = other, other.operator diff --git a/pym/gentoolkit/ekeyword/.pylintrc b/pym/gentoolkit/ekeyword/.pylintrc deleted file mode 100644 index cd5b31e..0000000 --- a/pym/gentoolkit/ekeyword/.pylintrc +++ /dev/null @@ -1,36 +0,0 @@ -[MESSAGES CONTROL] -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifier separated by comma (,) or put this option -# multiple times (only on the command line, not in the configuration file where -# it should appear only once). -disable= - missing-docstring, - too-many-lines, - too-many-branches, - too-many-statements, - too-few-public-methods, - too-many-instance-attributes, - too-many-public-methods, - too-many-locals, - too-many-arguments, - locally-enabled, - locally-disabled, - fixme, - bad-continuation, - invalid-name, - -[REPORTS] -reports=no - -[FORMAT] -max-line-length=80 -indent-string='\t' - -[SIMILARITIES] -min-similarity-lines=20 - -[VARIABLES] -dummy-variables-rgx=_ - -[DESIGN] -max-parents=10 diff --git a/pym/gentoolkit/ekeyword/ekeyword.py b/pym/gentoolkit/ekeyword/ekeyword.py index af37a9a..a1910ee 100755 --- a/pym/gentoolkit/ekeyword/ekeyword.py +++ b/pym/gentoolkit/ekeyword/ekeyword.py @@ -343,7 +343,6 @@ def process_ebuild(ebuild, ops, arch_status=None, verbose=0, quiet=0, def portage_settings(): """Return the portage settings we care about.""" # Portage creates the db member on the fly which confuses the linter. - # pylint: disable=no-member return portage.db['/']['vartree'].settings diff --git a/pym/gentoolkit/ekeyword/ekeyword_unittest.py b/pym/gentoolkit/ekeyword/ekeyword_unittest.py index de40e7a..5e66afe 100755 --- a/pym/gentoolkit/ekeyword/ekeyword_unittest.py +++ b/pym/gentoolkit/ekeyword/ekeyword_unittest.py @@ -3,8 +3,6 @@ # Distributed under the terms of the GNU General Public License v2 # Written by Mike Frysinger <vapier@gentoo.org> -# pylint: disable=no-self-use - """Unittests for ekeyword""" from __future__ import print_function diff --git a/pym/gentoolkit/ekeyword/pylint b/pym/gentoolkit/ekeyword/pylint deleted file mode 100755 index 3a9a368..0000000 --- a/pym/gentoolkit/ekeyword/pylint +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -"""Run pylint with the right settings.""" - -from __future__ import print_function - -import os -import sys - - -def find_all_modules(source_root): - """Locate all python modules in the tree for scanning""" - ret = [] - - for root, _dirs, files in os.walk(source_root, topdown=False): - # Add all of the .py modules in the tree. - ret += [os.path.join(root, x) for x in files if x.endswith('.py')] - - # Add the main scripts that don't end in .py. - ret += [os.path.join(source_root, x) for x in ('pylint',)] - - return ret - - -def main(argv): - """The main entry point""" - source_root = os.path.dirname(os.path.realpath(__file__)) - - if not argv: - argv = find_all_modules(source_root) - - pympath = source_root - pythonpath = os.environ.get('PYTHONPATH') - if pythonpath is None: - pythonpath = pympath - else: - pythonpath = pympath + ':' + pythonpath - os.environ['PYTHONPATH'] = pythonpath - - pylintrc = os.path.join(source_root, '.pylintrc') - cmd = ['pylint', '--rcfile', pylintrc] - os.execvp(cmd[0], cmd + argv) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/pym/gentoolkit/enalyze/output.py b/pym/gentoolkit/enalyze/output.py index fd7affa..3d63394 100644 --- a/pym/gentoolkit/enalyze/output.py +++ b/pym/gentoolkit/enalyze/output.py @@ -95,8 +95,6 @@ class AnalysisPrinter(CpvValueWrapper): cpv = _pkgs.pop(0) print(' '*52 + pp.cpv(cpv)) - # W0613: *Unused argument %r* - # pylint: disable-msg=W0613 def print_use_quiet(self, key, active, default, count, pkgs): """Quietly prints a subset set of USE flag info.. """ @@ -120,8 +118,6 @@ class AnalysisPrinter(CpvValueWrapper): cpv = _pkgs.pop(0) print(' '*37 + pp.cpv(cpv)) - # W0613: *Unused argument %r* - # pylint: disable-msg=W0613 def print_keyword_quiet(self, key, stability, default, count, pkgs): """Quietly prints a subset set of USE flag info.. """ @@ -129,8 +125,6 @@ class AnalysisPrinter(CpvValueWrapper): hard_masked=stability=="-")) print(self.prepend + _key,'.'*(20-len(key)), default, pp.number(count)) - # W0613: *Unused argument %r* - # pylint: disable-msg=W0613 def _format_pkg(self, key, active, flags): """Determines the stats for key, formats it and calls the pre-determined print function diff --git a/pym/gentoolkit/equery/belongs.py b/pym/gentoolkit/equery/belongs.py index 7c20658..8c16b89 100644 --- a/pym/gentoolkit/equery/belongs.py +++ b/pym/gentoolkit/equery/belongs.py @@ -54,8 +54,6 @@ class BelongsPrinter(object): def __call__(self, pkg, cfile): self.print_fn(pkg, cfile) - # W0613: *Unused argument %r* - # pylint: disable-msg=W0613 def print_quiet(self, pkg, cfile): "Format for minimal output." if self.name_only: diff --git a/pym/gentoolkit/equery/depends.py b/pym/gentoolkit/equery/depends.py index 93c2137..8ffc745 100644 --- a/pym/gentoolkit/equery/depends.py +++ b/pym/gentoolkit/equery/depends.py @@ -58,8 +58,6 @@ class DependPrinter(object): pp.uprint(indent + pp.cpv(cpv), "(" + use_conditional + sep + depatom + ")") - # W0613: *Unused argument %r* - # pylint: disable-msg=W0613 @staticmethod def print_quiet(indent, cpv, use_conditional, depatom): """Quietly prints a subset set of dep strings.""" diff --git a/pym/gentoolkit/equery/files.py b/pym/gentoolkit/equery/files.py index 9ef87cf..10c7fde 100644 --- a/pym/gentoolkit/equery/files.py +++ b/pym/gentoolkit/equery/files.py @@ -77,8 +77,6 @@ def print_help(with_description=True): print(" " * 24, ', '.join(pp.emph(x) for x in FILTER_RULES)) -# R0912: *Too many branches (%s/%s)* -# pylint: disable-msg=R0912 def display_files(contents): """Display the content of an installed package. diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py index 81da14b..d08ab23 100644 --- a/pym/gentoolkit/equery/meta.py +++ b/pym/gentoolkit/equery/meta.py @@ -31,10 +31,6 @@ from gentoolkit.query import Query # Globals # ======= -# E1101: Module 'portage.output' has no $color member -# portage.output creates color functions dynamically -# pylint: disable-msg=E1101 - QUERY_OPTS = { 'current': False, 'description': False, @@ -293,8 +289,6 @@ def format_homepage(homepage): return result -# R0912: *Too many branches (%s/%s)* -# pylint: disable-msg=R0912 def call_format_functions(best_match, matches): """Call information gathering functions and display the results.""" diff --git a/pym/gentoolkit/helpers.py b/pym/gentoolkit/helpers.py index 8993fed..40235d5 100644 --- a/pym/gentoolkit/helpers.py +++ b/pym/gentoolkit/helpers.py @@ -414,8 +414,6 @@ def get_cpvs(predicate=None, include_installed=True): yield cpv -# pylint thinks this is a global variable -# pylint: disable-msg=C0103 get_uninstalled_cpvs = partial(get_cpvs, include_installed=False) diff --git a/pym/gentoolkit/pprinter.py b/pym/gentoolkit/pprinter.py index 83f4859..610d72a 100644 --- a/pym/gentoolkit/pprinter.py +++ b/pym/gentoolkit/pprinter.py @@ -44,10 +44,6 @@ from portage import archlist # Functions # ========= -# output creates color functions on the fly, which confuses pylint. -# E1101: *%s %r has no %r member* -# pylint: disable-msg=E1101 - def command(string): """Returns a program command string.""" return output.green(string) |
