From 64cd7334da3a885b018562cd49ade3f6a633660f Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Fri, 20 Apr 2018 19:02:54 +0200 Subject: [PATCH] flake8: pycodestyle>=2.4 support --- srcpkgs/flake8/patches/pycodestyle-2.4.patch | 55 ++++++++++++++++++++ srcpkgs/flake8/template | 6 +-- 2 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/flake8/patches/pycodestyle-2.4.patch diff --git a/srcpkgs/flake8/patches/pycodestyle-2.4.patch b/srcpkgs/flake8/patches/pycodestyle-2.4.patch new file mode 100644 index 00000000000..70c6d3055bc --- /dev/null +++ b/srcpkgs/flake8/patches/pycodestyle-2.4.patch @@ -0,0 +1,55 @@ +https://gitlab.com/pycqa/flake8/merge_requests/230 +https://gitlab.com/pycqa/flake8/merge_requests/231 + +--- setup.cfg.orig ++++ setup.cfg +@@ -9,7 +9,7 @@ + enum34; python_version<"3.4" + configparser; python_version<"3.2" + pyflakes >= 1.5.0, < 1.7.0 +- pycodestyle >= 2.0.0, < 2.4.0 ++ pycodestyle >= 2.4.0, < 2.5.0 + mccabe >= 0.6.0, < 0.7.0 + + [egg_info] +--- setup.py.orig ++++ setup.py +@@ -22,7 +22,7 @@ + # And in which releases we will update those ranges here: + # http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8 + "pyflakes >= 1.5.0, < 1.7.0", +- "pycodestyle >= 2.0.0, < 2.4.0", ++ "pycodestyle >= 2.4.0, < 2.5.0", + "mccabe >= 0.6.0, < 0.7.0", + "setuptools >= 30", + ] +@@ -108,7 +108,8 @@ + PEP8_PLUGIN('module_imports_on_top_of_file'), + PEP8_PLUGIN('compound_statements'), + PEP8_PLUGIN('explicit_line_join'), +- PEP8_PLUGIN('break_around_binary_operator'), ++ PEP8_PLUGIN('break_after_binary_operator'), ++ PEP8_PLUGIN('break_before_binary_operator'), + PEP8_PLUGIN('comparison_to_singleton'), + PEP8_PLUGIN('comparison_negative'), + PEP8_PLUGIN('comparison_type'), +@@ -118,6 +119,8 @@ + PEP8_PLUGIN('python_3000_raise_comma'), + PEP8_PLUGIN('python_3000_not_equal'), + PEP8_PLUGIN('python_3000_backticks'), ++ PEP8_PLUGIN('python_3000_invalid_escape_sequence'), ++ PEP8_PLUGIN('python_3000_async_await_keywords'), + ], + 'flake8.report': [ + 'default = flake8.formatting.default:Default', +--- tox.ini.orig ++++ tox.ini +@@ -141,7 +141,7 @@ + # defaults to selecting all other errors so we do not need select=E,F,W,I,D + # Once Flake8 3.0 is released and in a good state, we can use both and it will + # work well \o/ +-ignore = D203 ++ignore = D203, W504 + exclude = + .tox, + .git, diff --git a/srcpkgs/flake8/template b/srcpkgs/flake8/template index 058ad5c6b03..96ea38272a4 100644 --- a/srcpkgs/flake8/template +++ b/srcpkgs/flake8/template @@ -1,7 +1,7 @@ # Template file for 'flake8' pkgname=flake8 version=3.5.0 -revision=1 +revision=2 noarch=yes build_style=python-module pycompile_module="flake8" @@ -17,9 +17,7 @@ checksum=7253265f7abd8b313e3892944044a365e3f4ac3fcdcfb4298f55ee9ddf188ba0 alternatives="flake8:flake8:/usr/bin/python2-flake8" pre_build() { - sed -i setup.py \ - -e 's/, *< *[0-9=.]*//' \ - -e '/setup_requires/d' + sed -i '/setup_requires/d' setup.py } post_install() { vlicense LICENSE