Accepting request 670469 from home:jayvdb:branches:devel:languages:python
- update to version 2.5.0 * New checks: + E117: Over-indented code blocks + W505: Maximum doc-string length only when configured with --max-doc-length * Changes: + Remove support for EOL Python 2.6 and 3.3. PR #720. + Add E117 error for over-indented code blocks. + Allow W605 to be silenced by `# noqa` and fix the position reported by W605 + Allow users to omit blank lines around one-liner definitions of classes and functions + Include the function return annotation (``->``) as requiring surrounding whitespace only on Python 3 + Verify that only names can follow ``await``. Previously we allowed numbers and strings. + Add support for Python 3.7 + Fix detection of annotated argument defaults for E252 + Correct the position reported by W504 - Removed comp_w_changes_tokenize.patch as it was merged into version 2.5.0 OBS-URL: https://build.opensuse.org/request/show/670469 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycodestyle?expand=0&rev=12
This commit is contained in:
parent
bb4ba55772
commit
086fb9c49a
@ -1,35 +0,0 @@
|
|||||||
From 397463014fda3cdefe8d6c9d117ae16d878dc494 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Hudson-Doyle <michael.hudson@canonical.com>
|
|
||||||
Date: Tue, 25 Sep 2018 14:58:57 +1200
|
|
||||||
Subject: [PATCH] Keep compability with stdlib tokenize.py changes
|
|
||||||
|
|
||||||
https://github.com/python/cpython/commit/c4ef4896eac86a6759901c8546e26de4695a1389
|
|
||||||
is not yet part of any release of Python but has been backported to all
|
|
||||||
versions in Git (includeing 2.7!). It causes the tokenize.py module to
|
|
||||||
emit a synthetic NEWLINE token for files that do not in fact end with a
|
|
||||||
newline, which confuses pycodestyle's checks for blank lines at the end
|
|
||||||
of a file. Fortunately the synthetic NEWLINE tokens are easy to detect
|
|
||||||
(the token text is "").
|
|
||||||
|
|
||||||
Fixes #786
|
|
||||||
---
|
|
||||||
pycodestyle.py | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pycodestyle.py b/pycodestyle.py
|
|
||||||
index 0d725d27..fbc3dca3 100755
|
|
||||||
--- a/pycodestyle.py
|
|
||||||
+++ b/pycodestyle.py
|
|
||||||
@@ -258,10 +258,10 @@ def trailing_blank_lines(physical_line, lines, line_number, total_lines):
|
|
||||||
"""
|
|
||||||
if line_number == total_lines:
|
|
||||||
stripped_last_line = physical_line.rstrip()
|
|
||||||
- if not stripped_last_line:
|
|
||||||
+ if physical_line and not stripped_last_line:
|
|
||||||
return 0, "W391 blank line at end of file"
|
|
||||||
if stripped_last_line == physical_line:
|
|
||||||
- return len(physical_line), "W292 no newline at end of file"
|
|
||||||
+ return len(lines[-1]), "W292 no newline at end of file"
|
|
||||||
|
|
||||||
|
|
||||||
@register_check
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:cbfca99bd594a10f674d0cd97a3d802a1fdef635d4361e1a2658de47ed261e3a
|
|
||||||
size 96665
|
|
3
pycodestyle-2.5.0.tar.gz
Normal file
3
pycodestyle-2.5.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c
|
||||||
|
size 98802
|
@ -1,3 +1,26 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 31 22:08:31 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
- update to version 2.5.0
|
||||||
|
* New checks:
|
||||||
|
+ E117: Over-indented code blocks
|
||||||
|
+ W505: Maximum doc-string length only when configured with --max-doc-length
|
||||||
|
|
||||||
|
* Changes:
|
||||||
|
+ Remove support for EOL Python 2.6 and 3.3. PR #720.
|
||||||
|
+ Add E117 error for over-indented code blocks.
|
||||||
|
+ Allow W605 to be silenced by `# noqa` and fix the position reported by W605
|
||||||
|
+ Allow users to omit blank lines around one-liner definitions of classes and
|
||||||
|
functions
|
||||||
|
+ Include the function return annotation (``->``) as requiring surrounding
|
||||||
|
whitespace only on Python 3
|
||||||
|
+ Verify that only names can follow ``await``. Previously we allowed numbers
|
||||||
|
and strings.
|
||||||
|
+ Add support for Python 3.7
|
||||||
|
+ Fix detection of annotated argument defaults for E252
|
||||||
|
+ Correct the position reported by W504
|
||||||
|
- Removed comp_w_changes_tokenize.patch as it was merged into version 2.5.0
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 2 14:59:36 UTC 2018 - Matěj Cepl <mcepl@suse.com>
|
Tue Oct 2 14:59:36 UTC 2018 - Matěj Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pycodestyle
|
# spec file for package python-pycodestyle
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -19,14 +19,13 @@
|
|||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define oldpython python
|
%define oldpython python
|
||||||
Name: python-pycodestyle
|
Name: python-pycodestyle
|
||||||
Version: 2.4.0
|
Version: 2.5.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python style guide checker
|
Summary: Python style guide checker
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://pycodestyle.readthedocs.io/
|
Url: https://pycodestyle.readthedocs.io/
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pycodestyle/pycodestyle-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pycodestyle/pycodestyle-%{version}.tar.gz
|
||||||
Patch0: comp_w_changes_tokenize.patch
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
Loading…
Reference in New Issue
Block a user