diff options
author | Emanuele Rocca <ema@debian.org> | 2022-09-08 10:21:12 +0200 |
---|---|---|
committer | Emanuele Rocca <ema@debian.org> | 2022-09-08 10:21:12 +0200 |
commit | 75d3fe6a139e13a9e28b7aad8b46d8e3f9685eca (patch) | |
tree | a73a366c9773cc01e0754904eaefa8666dc47b92 | |
parent | 67bc3f6fa7ab68fd4e0db9d0b66fc06b1da5e13e (diff) |
Add flake8-5.x-support.patch
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/patches/flake8-5.x-support.patch | 51 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 54 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 9260868..70db9f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ python-pytest-flake8 (1.1.1-1) UNRELEASED; urgency=medium * Team upload. * New upstream release. + * Add flake8-5.x-support.patch to support version 5 of flake8, currently in + unstable. (Closes: #1019352) * Drop fix-flake8-4.x-support.patch, applied upstream. -- Emanuele Rocca <ema@debian.org> Wed, 07 Sep 2022 20:06:47 +0200 diff --git a/debian/patches/flake8-5.x-support.patch b/debian/patches/flake8-5.x-support.patch new file mode 100644 index 0000000..fd743dd --- /dev/null +++ b/debian/patches/flake8-5.x-support.patch @@ -0,0 +1,51 @@ +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 +Origin: https://github.com/tholo/pytest-flake8/pull/88 + +--- + 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() diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..f977d3c --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +flake8-5.x-support.patch |