forked from pool/python-pytest-flake8
Accepting request 1001818 from devel:languages:python:pytest
- Update to 1.1.1:
* Update classifiers to indicate older versions are no longer supported
* No longer use deprecated pytest constructs
* Bump requirements to more accurately indicate what is currently needed
* Drop Python 2 support and dependency on py; from @erikkemperman
* Drop support for Python 3.5, 3.6
* Add a `flake8-max-doc-length` option; from @rodrigomologni
- Add patch support-flake8-5.patch:
* Support flake8 >= 5.0, adjust {Build,}Requires.
OBS-URL: https://build.opensuse.org/request/show/1001818
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-flake8?expand=0&rev=9
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f0259761a903563f33d6f099914afef339c085085e643bee8343eb323b32dd6b
|
||||
size 9560
|
||||
BIN
pytest-flake8-1.1.1.tar.gz
LFS
Normal file
BIN
pytest-flake8-1.1.1.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 8 04:38:54 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 1.1.1:
|
||||
* Update classifiers to indicate older versions are no longer supported
|
||||
* No longer use deprecated pytest constructs
|
||||
* Bump requirements to more accurately indicate what is currently needed
|
||||
* Drop Python 2 support and dependency on py; from @erikkemperman
|
||||
* Drop support for Python 3.5, 3.6
|
||||
* Add a `flake8-max-doc-length` option; from @rodrigomologni
|
||||
- Add patch support-flake8-5.patch:
|
||||
* Support flake8 >= 5.0, adjust {Build,}Requires.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 16 14:37:49 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pytest-flake8
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,19 +18,20 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pytest-flake8
|
||||
Version: 1.0.7
|
||||
Version: 1.1.1
|
||||
Release: 0
|
||||
Summary: Plugin for pytest to check FLAKE8 requirements
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/tholo/pytest-flake8
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-flake8/pytest-flake8-%{version}.tar.gz
|
||||
BuildRequires: %{python_module flake8 >= 3.5}
|
||||
# PATCH-FIX-UPSTREAM Support flake8 >= 5.0 gh#tholo/pytest-flake8#88
|
||||
Patch0: support-flake8-5.patch
|
||||
BuildRequires: %{python_module flake8 >= 5.0}
|
||||
BuildRequires: %{python_module pytest >= 3.5}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-flake8 >= 3.5
|
||||
Requires: python-flake8 >= 5.0
|
||||
Requires: python-pytest >= 3.5
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
@@ -39,7 +40,7 @@ BuildArch: noarch
|
||||
Plugin for py.test for efficiently checking PEP8 compliance.
|
||||
|
||||
%prep
|
||||
%setup -q -n pytest-flake8-%{version}
|
||||
%autosetup -p1 -n pytest-flake8-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
50
support-flake8-5.patch
Normal file
50
support-flake8-5.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From 976e6180201f7808a3007c8c5903a1637b18c0c8 Mon Sep 17 00:00:00 2001
|
||||
From: Dominic Oram <dominic.oram@diamond.ac.uk>
|
||||
Date: Fri, 5 Aug 2022 17:55:24 +0100
|
||||
Subject: [PATCH] Update to work for flake8==5.0.0
|
||||
|
||||
---
|
||||
pytest_flake8.py | 21 +++++++++++++--------
|
||||
1 file changed, 13 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/pytest_flake8.py b/pytest_flake8.py
|
||||
index 2555f8a..c693789 100644
|
||||
--- a/pytest_flake8.py
|
||||
+++ b/pytest_flake8.py
|
||||
@@ -212,23 +212,28 @@ def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity,
|
||||
args += ['--show-source']
|
||||
if statistics:
|
||||
args += ['--statistics']
|
||||
+ args += [str(path)]
|
||||
app = application.Application()
|
||||
prelim_opts, remaining_args = app.parse_preliminary_options(args)
|
||||
- config_finder = config.ConfigFileFinder(
|
||||
- app.program,
|
||||
- prelim_opts.append_config,
|
||||
- config_file=prelim_opts.config,
|
||||
- ignore_config_files=prelim_opts.isolated,
|
||||
+ cfg, cfg_dir = config.load_config(
|
||||
+ config=prelim_opts.config,
|
||||
+ extra=prelim_opts.append_config,
|
||||
+ isolated=prelim_opts.isolated,
|
||||
+ )
|
||||
+ app.find_plugins(
|
||||
+ cfg,
|
||||
+ cfg_dir,
|
||||
+ enable_extensions=prelim_opts.enable_extensions,
|
||||
+ require_plugins=prelim_opts.require_plugins,
|
||||
)
|
||||
- app.find_plugins(config_finder)
|
||||
app.register_plugin_options()
|
||||
- app.parse_configuration_and_cli(config_finder, remaining_args)
|
||||
+ app.parse_configuration_and_cli(cfg, cfg_dir, remaining_args)
|
||||
if flake8ignore:
|
||||
app.options.ignore = flake8ignore
|
||||
app.make_formatter() # fix this
|
||||
app.make_guide()
|
||||
app.make_file_checker_manager()
|
||||
- app.run_checks([str(path)])
|
||||
+ app.run_checks()
|
||||
app.formatter.start()
|
||||
app.report_errors()
|
||||
app.formatter.stop()
|
||||
Reference in New Issue
Block a user