Hello community, here is the log from the commit of package python-inspektor for openSUSE:Leap:15.2 checked in at 2020-02-19 18:48:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/python-inspektor (Old) and /work/SRC/openSUSE:Leap:15.2/.python-inspektor.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-inspektor" Wed Feb 19 18:48:23 2020 rev:11 rq:776682 version:0.5.2 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/python-inspektor/python-inspektor.changes 2020-01-15 15:49:21.719457542 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.python-inspektor.new.26092/python-inspektor.changes 2020-02-19 18:48:26.319013785 +0100 @@ -1,0 +2,23 @@ +Tue Apr 16 09:59:52 UTC 2019 - Martin Pluskal <[email protected]> + +- Update to version 0.5.2 + * No changelog available +- Use pypi url for source + +------------------------------------------------------------------- +Wed Jan 2 08:47:15 UTC 2019 - Martin Pluskal <[email protected]> + +- Do not run tests on old distributions + +------------------------------------------------------------------- +Tue Oct 9 08:21:56 UTC 2018 - Martin Pluskal <[email protected]> + +- Update dependencies to match latest python packaging changes + +------------------------------------------------------------------- +Fri Jul 27 11:20:41 UTC 2018 - [email protected] + +- Update to version 0.5.1: + * No changelog available + +------------------------------------------------------------------- Old: ---- inspektor-0.4.5.tar.gz New: ---- inspektor-0.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-inspektor.spec ++++++ --- /var/tmp/diff_new_pack.wv91Vu/_old 2020-02-19 18:48:26.579014062 +0100 +++ /var/tmp/diff_new_pack.wv91Vu/_new 2020-02-19 18:48:26.579014062 +0100 @@ -1,7 +1,7 @@ # -# spec file for package python +# spec file for package python-inspektor # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,36 +12,48 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %global pkgname inspektor Name: python-%{pkgname} -Version: 0.4.5 +Version: 0.5.2 Release: 0 Summary: Program used to verify the code of your python project -License: GPL-2.0 +License: GPL-2.0-only Group: Development/Languages/Python -Url: https://github.com/avocado-framework/inspektor -Source: https://github.com/avocado-framework/inspektor/archive/%{version}.tar.gz#/%{pkgname}-%{version}.tar.gz -BuildRequires: %{python_module base} +URL: https://github.com/avocado-framework/inspektor +#Source: https://github.com/avocado-framework/inspektor/archive/%{version}.tar.gz#/%{pkgname}-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/42/8a/9e375ac0bb498760fe2408a2e0f1fe09808933e593d1b6f04193492b9048/inspektor-%{version}.tar.gz +BuildRequires: %{python_module astroid >= 1.2.1} +BuildRequires: %{python_module cliff} +BuildRequires: %{python_module cmd2} BuildRequires: %{python_module devel} -BuildRequires: %{python_module logutils} -BuildRequires: %{python_module pep8} -BuildRequires: %{python_module pylint} +BuildRequires: %{python_module logutils >= 0.3.3} +BuildRequires: %{python_module pbr >= 1.4} +BuildRequires: %{python_module pycodestyle >= 2.0.0} +BuildRequires: %{python_module pylint >= 1.3.1} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} +BuildRequires: %{python_module stevedore} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-logutils -Requires: python-pep8 -Requires: python-pylint -Requires: python-six +Requires: python-astroid >= 1.2.1 +Requires: python-cliff +Requires: python-cmd2 +Requires: python-logutils >= 0.3.3 +Requires: python-pbr >= 1.4 +Requires: python-pycodestyle >= 2.0.0 +Requires: python-pylint >= 1.3.1 +Requires: python-stevedore Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch +%ifpython3 +BuildRequires: python3-typed-ast +Requires: python3-typed-ast +%endif %python_subpackages %description @@ -57,6 +69,12 @@ %build %python_build +%check +# No worky on SLE +%if 0%{?suse_version} >= 1500 +%python_exec setup.py test +%endif + %install %python_install %python_clone -a %{buildroot}%{_bindir}/inspekt @@ -69,7 +87,8 @@ %python_uninstall_alternative inspekt %files %{python_files} -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %python_alternative %{_bindir}/inspekt %{python_sitelib}/* ++++++ inspektor-0.4.5.tar.gz -> inspektor-0.5.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/.gitignore new/inspektor-0.5.2/.gitignore --- old/inspektor-0.4.5/.gitignore 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/.gitignore 2018-07-18 04:53:11.000000000 +0200 @@ -5,6 +5,7 @@ cscope.* .project .pydevproject -.venv +.venv* .idea +inspektor.egg-info MANIFEST diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/Makefile new/inspektor-0.5.2/Makefile --- old/inspektor-0.4.5/Makefile 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/Makefile 2018-07-18 14:24:28.000000000 +0200 @@ -43,7 +43,7 @@ -ba inspektor.spec check: - inspekt checkall --verbose + inspekt checkall --verbose --exclude .venv clean: $(PYTHON) setup.py clean diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/PKG-INFO new/inspektor-0.5.2/PKG-INFO --- old/inspektor-0.4.5/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/PKG-INFO 2018-07-18 14:28:55.000000000 +0200 @@ -0,0 +1,95 @@ +Metadata-Version: 1.1 +Name: inspektor +Version: 0.5.2 +Summary: Inspektor python code checker and fixer +Home-page: https://github.com/avocado-framework/inspektor +Author: Lucas Meneghel Rodrigues +Author-email: [email protected] +License: UNKNOWN +Download-URL: https://github.com/avocado-framework/inspektor/tarball/master +Description: Inspektor + ========= + + Inspektor is a program used to verify the code of your python project. It + evolved from a set of scripts used to check patches and code of python projects + of the autotest organization [1]. As the project grew and new modules started + to be developed, we noticed the same scripts had to be copied to each new + project repo, creating a massive headache when we needed to update said + scripts. + + Inspektor knows how to: + + 1) Check code with the help of `pylint`. + 2) Check indentation of your code with the help of `pycodestyle`, + correcting it if you so deem appropriate. + 3) Check whether your code is PEP8 compliant, correcting it if necessary + (only works if you have `autopep8` installed) if you so deem appropriate. + 4) If your project is hosted on the autotest github area, it can apply pull + requests made against it, and check if it introduced any regression from + the metrics outlined above. + + This all assumes you're working on a version control checkout of your code. + Currently inspektor knows how to handle subversion and git. + + Installing inspektor + -------------------- + + You can get inspektor through pip: + + :: + + $ sudo pip install inspektor + + But you should avoid doing that if possible. A virtual environment deployment + tends to be better, since each installation is restricted to each environment: + + :: + + $ virtualenv .venv + $ source .venv/bin/activate + $ pip install inspektor + + If you are developing inspektor, you can install it in your virtual environment + as an editable package. From this source code tree root: + + :: + + $ pip install -e . + + Usage + ----- + + 1) Go to the root of your project source code clone + 2) If you want to check code with pylint: + + :: + + inspekt lint + 3) If you want to check indentation: + + :: + + inspekt indent + 4) If you want to check compliance to the PEP8: + + :: + + inspekt style + 5) If you want to check PR #123 for a project inside the autotest github area: + + :: + + inspekt github 123 + + [1] http://autotest.github.io/ + +Platform: Any +Classifier: Development Status :: 3 - Alpha +Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Intended Audience :: Developers +Classifier: Environment :: Console diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/documentation/source/conf.py new/inspektor-0.5.2/documentation/source/conf.py --- old/inspektor-0.4.5/documentation/source/conf.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/documentation/source/conf.py 2018-07-18 14:24:49.000000000 +0200 @@ -56,9 +56,9 @@ # built documents. # # The short X.Y version. -version = '0.1.5' +version = '0.5.2' # The full version, including alpha/beta/rc tags. -release = '0.1.5' +release = '0.5.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/cli/app.py new/inspektor-0.5.2/inspektor/cli/app.py --- old/inspektor-0.4.5/inspektor/cli/app.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/cli/app.py 2018-07-18 14:24:49.000000000 +0200 @@ -26,7 +26,7 @@ def __init__(self): super(InspektorApp, self).__init__( description='Inspektor python code checker and fixer', - version='0.4.0', + version='0.5.2', command_manager=CommandManager('inspektor.app'), deferred_help=True, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/checkall.py new/inspektor-0.5.2/inspektor/commands/checkall.py --- old/inspektor-0.4.5/inspektor/commands/checkall.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/commands/checkall.py 2018-07-18 14:24:36.000000000 +0200 @@ -69,8 +69,6 @@ parser.add_argument('--author', type=str, help='Author string. Ex: "Author: Brandon Lindon <[email protected]>"', default="") - parser.add_argument('--verbose', action='store_true', - help='Print extra debug messages') return parser def take_action(self, parsed_args): @@ -90,11 +88,11 @@ status = True for path in checked_paths: - status &= linter.check(path=path) status &= reindenter.check(path=path) status &= style_checker.check(path=path) if license_checker is not None: status &= license_checker.check(path=path) + status &= linter.check(checked_paths) if status: self.log.info('Global check PASS') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/github.py new/inspektor-0.5.2/inspektor/commands/github.py --- old/inspektor-0.4.5/inspektor/commands/github.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/commands/github.py 2018-04-18 17:00:17.000000000 +0200 @@ -91,8 +91,6 @@ help='Quoted string containing paths or ' 'patterns to be excluded from ' 'checking, comma separated') - parser.add_argument('--verbose', action='store_true', - help='Print extra debug messages') return parser def take_action(self, parsed_args): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/indent.py new/inspektor-0.5.2/inspektor/commands/indent.py --- old/inspektor-0.4.5/inspektor/commands/indent.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/commands/indent.py 2018-04-18 17:00:17.000000000 +0200 @@ -35,8 +35,6 @@ help='Quoted string containing paths or ' 'patterns to be excluded from ' 'checking, comma separated') - parser.add_argument('--verbose', action='store_true', - help='Print extra debug messages') return parser def take_action(self, parsed_args): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/license.py new/inspektor-0.5.2/inspektor/commands/license.py --- old/inspektor-0.4.5/inspektor/commands/license.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/commands/license.py 2018-04-18 17:00:17.000000000 +0200 @@ -46,8 +46,6 @@ help='Quoted string containing paths or ' 'patterns to be excluded from ' 'checking, comma separated') - parser.add_argument('--verbose', action='store_true', - help='Print extra debug messages') parser.add_argument('--fix', action='store_true', default=False, help='Fix any style problems found ' '(needs autopep8 installed)') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/lint.py new/inspektor-0.5.2/inspektor/commands/lint.py --- old/inspektor-0.4.5/inspektor/commands/lint.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/commands/lint.py 2018-04-18 17:00:17.000000000 +0200 @@ -10,6 +10,7 @@ # See LICENSE for more details. import logging +import multiprocessing import os from cliff.command import Command @@ -41,8 +42,9 @@ help='Quoted string containing paths or ' 'patterns to be excluded from ' 'checking, comma separated') - parser.add_argument('--verbose', action='store_true', - help='Print extra debug messages') + parser.add_argument('--parallel', action='store', nargs='?', + default=multiprocessing.cpu_count(), + help="How many threads to use") return parser def take_action(self, parsed_args): @@ -50,10 +52,8 @@ parsed_args.path = [os.getcwd()] linter = Linter(parsed_args, logger=self.log) + status = linter.check(parsed_args.path) - status = True - for path in parsed_args.path: - status &= linter.check(path) if status: self.log.info("Syntax check PASS") return 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/style.py new/inspektor-0.5.2/inspektor/commands/style.py --- old/inspektor-0.4.5/inspektor/commands/style.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/commands/style.py 2018-04-18 17:00:17.000000000 +0200 @@ -43,8 +43,6 @@ help='Quoted string containing paths or ' 'patterns to be excluded from ' 'checking, comma separated') - parser.add_argument('--verbose', action='store_true', - help='Print extra debug messages') return parser def take_action(self, parsed_args): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/lint.py new/inspektor-0.5.2/inspektor/lint.py --- old/inspektor-0.4.5/inspektor/lint.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/lint.py 2018-07-18 14:24:28.000000000 +0200 @@ -16,7 +16,7 @@ import os import sys -from pylint.lint import Run +from pylint.lint import Run, PyLinter from .path import PathChecker from .utils import process @@ -24,6 +24,31 @@ _PYLINT_HELP_TEXT = process.run('pylint --help', verbose=False).stdout +class QuietPyLinter(PyLinter): + def read_config_file(self, *args, **kwargs): + if getattr(self, 'quiet', None) is not None: + # pylint: disable=E0203 + quiet = self.quiet + try: + self.quiet = 1 + return super(QuietPyLinter, self).read_config_file() + finally: + self.quiet = quiet + + return super(QuietPyLinter, self).read_config_file() + + +class QuietLintRun(Run): + LinterClass = QuietPyLinter + + def __init__(self, *args, **kwargs): + try: + super(QuietLintRun, self).__init__(*args, **kwargs) + except TypeError: + kwargs.pop('exit') + super(QuietLintRun, self).__init__(*args, **kwargs) + + class Linter(object): def __init__(self, args, logger=logging.getLogger('')): @@ -39,18 +64,15 @@ self.enabled_errors = args.enable_lint self.log = logger self.args = args - self.verbose = args.verbose + if hasattr(args, 'parallel'): + self.parallel = args.parallel + else: + import multiprocessing + self.parallel = multiprocessing.cpu_count() # Be able to analyze all imports inside the project sys.path.insert(0, os.getcwd()) - self.failed_paths = [] - if not self.verbose: - self.log.info('Pylint disabled: %s' % self.ignored_errors) - self.log.info('Pylint enabled : %s' % self.enabled_errors) - else: - self.log.info('Verbose mode, no disable/enable, full reports') - - def set_verbose(self): - self.verbose = True + self.log.info('Pylint disabled: %s', self.ignored_errors) + self.log.info('Pylint enabled : %s', self.enabled_errors) @staticmethod def _pylint_has_option(option): @@ -65,62 +87,52 @@ ('--msg-template=' '"{msg_id}:{line:3d},{column}: {obj}: {msg}"')] - if not self.verbose: - if self.ignored_errors: - pylint_args.append('--disable=%s' % self.ignored_errors) - if self.enabled_errors: - pylint_args.append('--enable=%s' % self.enabled_errors) - if self._pylint_has_option('--reports='): - pylint_args.append('--reports=no') - if self._pylint_has_option('--score='): - pylint_args.append('--score=no') + if self.ignored_errors: + pylint_args.append('--disable=%s' % self.ignored_errors) + if self.enabled_errors: + pylint_args.append('--enable=%s' % self.enabled_errors) + if self._pylint_has_option('--reports='): + pylint_args.append('--reports=no') + if self._pylint_has_option('--score='): + pylint_args.append('--score=no') + if self._pylint_has_option('--jobs='): + pylint_args.append('--jobs=%s' % self.parallel) return pylint_args - def check_dir(self, path): - """ - Recursively go on a directory checking files with pylint. - - :param path: Path to a directory. - """ - for root, dirs, files in os.walk(path): - for filename in files: - self.check_file(os.path.join(root, filename)) - - return not self.failed_paths - - def check_file(self, path): - """ - Check one regular file with pylint for py syntax errors. - - :param path: Path to a regular file. - :return: False, if pylint found syntax problems, True, if pylint didn't - find problems, or path is not a python module or script. - """ - checker = PathChecker(path=path, args=self.args, label='Lint', - logger=self.log) - if not checker.check_attributes('text', 'python', 'not_empty'): - return True - try: - runner = Run(self.get_opts() + [path], exit=False) - if runner.linter.msg_status != 0: - self.failed_paths.append(path) - checker.log_status(status='FAIL') + def check(self, file_or_dirs): + def should_be_checked(path): + checker = PathChecker(path=path, args=self.args, label='Lint', + logger=self.log) + return checker.check_attributes('text', 'python', 'not_empty') + paths = [] + not_file_or_dirs = [] + for file_or_dir in file_or_dirs: + if os.path.isdir(file_or_dir): + for root, _, files in os.walk(file_or_dir): + for filename in files: + path = os.path.join(root, filename) + if should_be_checked(path): + paths.append(path) + elif os.path.isfile(file_or_dir): + if should_be_checked(file_or_dir): + paths.append(file_or_dir) else: - checker.log_status(status='PASS') - return runner.linter.msg_status == 0 - except Exception as details: - self.log.error('Pylint check fail: %s (pylint exception: %s)', - path, details) - self.failed_paths.append(path) - checker.log_status(status='FAIL') - return False - - def check(self, path): - if os.path.isfile(path): - return self.check_file(path) - elif os.path.isdir(path): - return self.check_dir(path) - else: - self.log.error("Invalid location '%s'", path) - return False + not_file_or_dirs.append(file_or_dir) + linter_failed = True + if paths: + runner = QuietLintRun(self.get_opts() + paths, exit=False) + for module, status in runner.linter.stats.get('by_module').items(): + if any(status.values()): + self.log.debug('Lint: %s FAIL', module) + else: + self.log.debug('Lint: %s PASS', module) + if runner.linter.msg_status == 0: + linter_failed = False + if not_file_or_dirs: + self.log.error("Following arguments are not files nor dirs: %s", + ", ".join(not_file_or_dirs)) + return 0 + if linter_failed: + return 0 + return 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/style.py new/inspektor-0.5.2/inspektor/style.py --- old/inspektor-0.4.5/inspektor/style.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/style.py 2018-04-18 17:00:17.000000000 +0200 @@ -43,7 +43,7 @@ elif hasattr(args, 'disable_style'): self.ignored_errors = args.disable_style self.args = args - self.log.info('PEP8 disabled: %s' % self.ignored_errors) + self.log.info('PEP8 disabled: %s', self.ignored_errors) def check_dir(self, path): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/utils/__init__.py new/inspektor-0.5.2/inspektor/utils/__init__.py --- old/inspektor-0.4.5/inspektor/utils/__init__.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/utils/__init__.py 2018-04-18 17:00:17.000000000 +0200 @@ -36,9 +36,9 @@ :param auto: Whether to return "y" instead of asking the question """ if auto: - log.info("%s (%s) y" % (question, options)) + log.info("%s (%s) y", question, options) return "y" - return input("%s (%s) " % (question, options)) + return input("%s (%s) ", question, options) def random_string(length, ignore_str=string.punctuation, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor/utils/vcs.py new/inspektor-0.5.2/inspektor/utils/vcs.py --- old/inspektor-0.4.5/inspektor/utils/vcs.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor/utils/vcs.py 2018-04-18 17:00:17.000000000 +0200 @@ -234,8 +234,8 @@ def update(self): try: process.run("svn update") - except exceptions.CmdError as e: - self.log.error("SVN tree update failed: %s" % e) + except exceptions.CmdError as details: + self.log.error("SVN tree update failed: %s", details) def get_modified_files_patch(self, untracked_files_before, patch): """ @@ -281,10 +281,10 @@ def get_repo_name(self): """ - Get tje repository name from git remote command output. + Get the repository name from git remote command output. """ cmd = "git remote -v | head -n1 | awk '{print $2}'" - cmd += " | sed -e 's,.*:\(.*/\)\?,,' -e 's/\.git$//'" + cmd += " | sed -e 's,.*:\\(.*/\\)\\?,,' -e 's/\\.git$//'" return process.run(cmd, verbose=False, shell=True).stdout.strip() def get_unknown_files(self): @@ -376,8 +376,7 @@ process.run("git checkout -b %s" % branch, verbose=False) except exceptions.CmdError: - self.log.error("branch %s already exists!" - % branch) + self.log.error("branch %s already exists!", branch) answer = ask("What would you like to do?", options="Abort/Delete/Rename/OldBase/NewBase") if not answer: @@ -427,15 +426,16 @@ process.run("git checkout -b %s" % branch, verbose=False) try: process.run("git am -3 %s" % patch, verbose=False) - except exceptions.CmdError as e: - self.log.error("Failed to apply patch to the git repo: %s" % e) + except exceptions.CmdError as details: + self.log.error("Failed to apply patch to the git repo: %s", + details) return 1 def update(self): try: process.run("git pull", verbose=False) - except exceptions.CmdError as e: - self.log.error("git tree update failed: %s" % e) + except exceptions.CmdError as details: + self.log.error("git tree update failed: %s", details) def get_modified_files_patch(self, untracked_files_before, patch): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor.egg-info/PKG-INFO new/inspektor-0.5.2/inspektor.egg-info/PKG-INFO --- old/inspektor-0.4.5/inspektor.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/inspektor.egg-info/PKG-INFO 2018-07-18 14:28:55.000000000 +0200 @@ -0,0 +1,95 @@ +Metadata-Version: 1.1 +Name: inspektor +Version: 0.5.2 +Summary: Inspektor python code checker and fixer +Home-page: https://github.com/avocado-framework/inspektor +Author: Lucas Meneghel Rodrigues +Author-email: [email protected] +License: UNKNOWN +Download-URL: https://github.com/avocado-framework/inspektor/tarball/master +Description: Inspektor + ========= + + Inspektor is a program used to verify the code of your python project. It + evolved from a set of scripts used to check patches and code of python projects + of the autotest organization [1]. As the project grew and new modules started + to be developed, we noticed the same scripts had to be copied to each new + project repo, creating a massive headache when we needed to update said + scripts. + + Inspektor knows how to: + + 1) Check code with the help of `pylint`. + 2) Check indentation of your code with the help of `pycodestyle`, + correcting it if you so deem appropriate. + 3) Check whether your code is PEP8 compliant, correcting it if necessary + (only works if you have `autopep8` installed) if you so deem appropriate. + 4) If your project is hosted on the autotest github area, it can apply pull + requests made against it, and check if it introduced any regression from + the metrics outlined above. + + This all assumes you're working on a version control checkout of your code. + Currently inspektor knows how to handle subversion and git. + + Installing inspektor + -------------------- + + You can get inspektor through pip: + + :: + + $ sudo pip install inspektor + + But you should avoid doing that if possible. A virtual environment deployment + tends to be better, since each installation is restricted to each environment: + + :: + + $ virtualenv .venv + $ source .venv/bin/activate + $ pip install inspektor + + If you are developing inspektor, you can install it in your virtual environment + as an editable package. From this source code tree root: + + :: + + $ pip install -e . + + Usage + ----- + + 1) Go to the root of your project source code clone + 2) If you want to check code with pylint: + + :: + + inspekt lint + 3) If you want to check indentation: + + :: + + inspekt indent + 4) If you want to check compliance to the PEP8: + + :: + + inspekt style + 5) If you want to check PR #123 for a project inside the autotest github area: + + :: + + inspekt github 123 + + [1] http://autotest.github.io/ + +Platform: Any +Classifier: Development Status :: 3 - Alpha +Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Intended Audience :: Developers +Classifier: Environment :: Console diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor.egg-info/SOURCES.txt new/inspektor-0.5.2/inspektor.egg-info/SOURCES.txt --- old/inspektor-0.4.5/inspektor.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/inspektor.egg-info/SOURCES.txt 2018-07-18 14:28:55.000000000 +0200 @@ -0,0 +1,53 @@ +.gitignore +.travis.yml +LICENSE +MANIFEST.in +Makefile +README.rst +inspektor.spec +setup.py +debian/changelog +debian/compat +debian/control +debian/copyright +debian/pyversions +debian/rules +debian/watch +debian/source/format +debian/source/options +documentation/Makefile +documentation/source/conf.py +documentation/source/index.rst +documentation/source/_static/.gitignore +documentation/source/_templates/.gitignore +inspektor/__init__.py +inspektor/indent.py +inspektor/license.py +inspektor/lint.py +inspektor/patch.py +inspektor/path.py +inspektor/style.py +inspektor.egg-info/PKG-INFO +inspektor.egg-info/SOURCES.txt +inspektor.egg-info/dependency_links.txt +inspektor.egg-info/entry_points.txt +inspektor.egg-info/namespace_packages.txt +inspektor.egg-info/not-zip-safe +inspektor.egg-info/requires.txt +inspektor.egg-info/top_level.txt +inspektor/cli/__init__.py +inspektor/cli/app.py +inspektor/commands/__init__.py +inspektor/commands/checkall.py +inspektor/commands/github.py +inspektor/commands/indent.py +inspektor/commands/license.py +inspektor/commands/lint.py +inspektor/commands/style.py +inspektor/utils/__init__.py +inspektor/utils/data_structures.py +inspektor/utils/download.py +inspektor/utils/exceptions.py +inspektor/utils/process.py +inspektor/utils/stacktrace.py +inspektor/utils/vcs.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor.egg-info/dependency_links.txt new/inspektor-0.5.2/inspektor.egg-info/dependency_links.txt --- old/inspektor-0.4.5/inspektor.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/inspektor.egg-info/dependency_links.txt 2018-07-18 14:28:55.000000000 +0200 @@ -0,0 +1 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor.egg-info/entry_points.txt new/inspektor-0.5.2/inspektor.egg-info/entry_points.txt --- old/inspektor-0.4.5/inspektor.egg-info/entry_points.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/inspektor.egg-info/entry_points.txt 2018-07-18 14:28:55.000000000 +0200 @@ -0,0 +1,11 @@ +[console_scripts] +inspekt = inspektor.cli.app:main + +[inspektor.app] +checkall = inspektor.commands.checkall:CheckAllCommand +github = inspektor.commands.github:GithubCommand +indent = inspektor.commands.indent:IndentCommand +license = inspektor.commands.license:LicenseCommand +lint = inspektor.commands.lint:LintCommand +style = inspektor.commands.style:StyleCommand + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor.egg-info/namespace_packages.txt new/inspektor-0.5.2/inspektor.egg-info/namespace_packages.txt --- old/inspektor-0.4.5/inspektor.egg-info/namespace_packages.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/inspektor.egg-info/namespace_packages.txt 2018-07-18 14:28:55.000000000 +0200 @@ -0,0 +1 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor.egg-info/not-zip-safe new/inspektor-0.5.2/inspektor.egg-info/not-zip-safe --- old/inspektor-0.4.5/inspektor.egg-info/not-zip-safe 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/inspektor.egg-info/not-zip-safe 2018-04-18 17:05:09.000000000 +0200 @@ -0,0 +1 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor.egg-info/requires.txt new/inspektor-0.5.2/inspektor.egg-info/requires.txt --- old/inspektor-0.4.5/inspektor.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/inspektor.egg-info/requires.txt 2018-07-18 14:28:55.000000000 +0200 @@ -0,0 +1,4 @@ +six +pycodestyle +pylint +cliff diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor.egg-info/top_level.txt new/inspektor-0.5.2/inspektor.egg-info/top_level.txt --- old/inspektor-0.4.5/inspektor.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/inspektor.egg-info/top_level.txt 2018-07-18 14:28:55.000000000 +0200 @@ -0,0 +1 @@ +inspektor diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/inspektor.spec new/inspektor-0.5.2/inspektor.spec --- old/inspektor-0.4.5/inspektor.spec 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/inspektor.spec 2018-07-18 14:24:49.000000000 +0200 @@ -1,11 +1,11 @@ -%global inspektorversion 0.4.5 +%global inspektorversion 0.5.2 Summary: Inspektor python project checker Name: inspektor Version: %{inspektorversion} Release: 0%{?dist} License: GPLv2 Group: Development/Tools -URL: https://github.com/autotest/inspektor +URL: https://github.com/avocado-framework/inspektor Source: inspektor-%{inspektorversion}.tar.gz BuildArch: noarch @@ -44,6 +44,13 @@ %changelog +* Wed Jul 18 2018 Lucas Meneghel Rodrigues <[email protected]> - 0.5.2-0 +- New upstream version 0.5.2 +* Thu May 3 2018 Cleber Rosa <[email protected]> - 0.5.1-0 +- New upstream version 0.5.1 +* Thu May 3 2018 Cleber Rosa <[email protected]> - 0.4.6-0 +- New upstream version 0.4.6 +- Updated URL from autotest to avocado-framework project * Fri Aug 11 2017 Lucas Meneghel Rodrigues <[email protected]> - 0.4.5-0 - New upstream version 0.4.5 * Wed Jul 19 2017 Lucas Meneghel Rodrigues <[email protected]> - 0.4.0-0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/setup.cfg new/inspektor-0.5.2/setup.cfg --- old/inspektor-0.4.5/setup.cfg 1970-01-01 01:00:00.000000000 +0100 +++ new/inspektor-0.5.2/setup.cfg 2018-07-18 14:28:55.000000000 +0200 @@ -0,0 +1,4 @@ +[egg_info] +tag_build = +tag_date = 0 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inspektor-0.4.5/setup.py new/inspektor-0.5.2/setup.py --- old/inspektor-0.4.5/setup.py 2017-08-11 11:36:39.000000000 +0200 +++ new/inspektor-0.5.2/setup.py 2018-07-18 14:24:49.000000000 +0200 @@ -19,14 +19,14 @@ PROJECT = 'inspektor' -# Change docs/sphinx/conf.py too! -VERSION = '0.4.5' +# Change documentation/source/conf.py and inspektor/cli/app.py +VERSION = '0.5.2' REQUIRES = ['six'] if sys.version_info[:2] == (2, 6): REQUIRES += ['astroid==1.2.1', 'pycodestyle>=2.0.0', 'pylint==1.3.1', 'logutils>=0.3.3', 'stevedore<=1.10', 'cliff<=1.15.0', - 'pbr<2.0,>=1.4'] + 'pbr<2.0,>=1.4', 'cmd2<=0.7.0'] elif sys.version_info[:2] == (2, 7): REQUIRES += ['pycodestyle>=2.0.0', 'pylint>=1.3', 'cliff'] elif sys.version_info[0] == 3:
