Hello community,
here is the log from the commit of package python-pep8-naming for
openSUSE:Leap:15.2 checked in at 2020-03-26 05:41:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-pep8-naming (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-pep8-naming.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pep8-naming"
Thu Mar 26 05:41:28 2020 rev:7 rq:788079 version:0.10.0
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-pep8-naming/python-pep8-naming.changes
2020-03-09 18:10:11.209095192 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.python-pep8-naming.new.3160/python-pep8-naming.changes
2020-03-26 05:41:31.971283573 +0100
@@ -1,0 +2,11 @@
+Tue Mar 24 12:49:26 UTC 2020 - [email protected]
+
+- version update to 0.10.0
+ * ``--ignore-names`` now supports globbing and applies to the N804 and N805
+ checks.
+ * "acronym" imports are now treated as their own error code (N817).
+ * Metaclass detection has been improved.
+ * Annotated variable declarations (PEP 526) and ``:=`` variable assignments
+ are now supported.
+
+-------------------------------------------------------------------
Old:
----
pep8-naming-0.9.1.tar.gz
New:
----
pep8-naming-0.10.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pep8-naming.spec ++++++
--- /var/tmp/diff_new_pack.M0ssaG/_old 2020-03-26 05:41:32.619283908 +0100
+++ /var/tmp/diff_new_pack.M0ssaG/_new 2020-03-26 05:41:32.623283911 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pep8-naming
#
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pep8-naming
-Version: 0.9.1
+Version: 0.10.0
Release: 0
Summary: Flake8 plugin for checking PEP-8 naming conventions
License: MIT
++++++ pep8-naming-0.9.1.tar.gz -> pep8-naming-0.10.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/CHANGELOG.rst
new/pep8-naming-0.10.0/CHANGELOG.rst
--- old/pep8-naming-0.9.1/CHANGELOG.rst 2019-11-14 18:59:02.000000000 +0100
+++ new/pep8-naming-0.10.0/CHANGELOG.rst 2020-03-20 22:13:50.000000000
+0100
@@ -1,6 +1,19 @@
Changes
=======
+0.10.0 - 2020-03-20
+------------------
+
+* ``--ignore-names`` now supports globbing and applies to the N804 and N805
+ checks.
+
+* "acronym" imports are now treated as their own error code (N817).
+
+* Metaclass detection has been improved.
+
+* Annotated variable declarations (PEP 526) and ``:=`` variable assignments
+ are now supported.
+
0.9.1 - 2019-11-14
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/PKG-INFO
new/pep8-naming-0.10.0/PKG-INFO
--- old/pep8-naming-0.9.1/PKG-INFO 2019-11-14 18:59:28.000000000 +0100
+++ new/pep8-naming-0.10.0/PKG-INFO 2020-03-20 22:24:16.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pep8-naming
-Version: 0.9.1
+Version: 0.10.0
Summary: Check PEP-8 naming conventions, plugin for flake8
Home-page: https://github.com/PyCQA/pep8-naming
Author: Florent Xicluna
@@ -73,15 +73,17 @@
+------+-------------------------------------------------------+
| N816 | mixedCase variable in global scope |
+------+-------------------------------------------------------+
+ | N817 | camelcase imported as acronym |
+ +------+-------------------------------------------------------+
Options
-------
The following flake8 options are added:
- --ignore-names Ignore errors for specific variable names.
+ --ignore-names Ignore errors for specific names or glob
patterns.
- Currently, this option can only be used
for N802, N803, N806, N815, and N816 errors.
+ Currently, this option can only be used
for N802, N803, N804, N805, N806, N815, and N816 errors.
Default:
``setUp,tearDown,setUpClass,tearDownClass,setUpTestData,failureException,longMessage,maxDiff``.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/README.rst
new/pep8-naming-0.10.0/README.rst
--- old/pep8-naming-0.9.1/README.rst 2019-11-14 18:59:02.000000000 +0100
+++ new/pep8-naming-0.10.0/README.rst 2020-02-07 00:56:42.000000000 +0100
@@ -65,15 +65,17 @@
+------+-------------------------------------------------------+
| N816 | mixedCase variable in global scope |
+------+-------------------------------------------------------+
+| N817 | camelcase imported as acronym |
++------+-------------------------------------------------------+
Options
-------
The following flake8 options are added:
---ignore-names Ignore errors for specific variable names.
+--ignore-names Ignore errors for specific names or glob patterns.
- Currently, this option can only be used for N802,
N803, N806, N815, and N816 errors.
+ Currently, this option can only be used for N802,
N803, N804, N805, N806, N815, and N816 errors.
Default:
``setUp,tearDown,setUpClass,tearDownClass,setUpTestData,failureException,longMessage,maxDiff``.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/src/pep8_naming.egg-info/PKG-INFO
new/pep8-naming-0.10.0/src/pep8_naming.egg-info/PKG-INFO
--- old/pep8-naming-0.9.1/src/pep8_naming.egg-info/PKG-INFO 2019-11-14
18:59:28.000000000 +0100
+++ new/pep8-naming-0.10.0/src/pep8_naming.egg-info/PKG-INFO 2020-03-20
22:24:16.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pep8-naming
-Version: 0.9.1
+Version: 0.10.0
Summary: Check PEP-8 naming conventions, plugin for flake8
Home-page: https://github.com/PyCQA/pep8-naming
Author: Florent Xicluna
@@ -73,15 +73,17 @@
+------+-------------------------------------------------------+
| N816 | mixedCase variable in global scope |
+------+-------------------------------------------------------+
+ | N817 | camelcase imported as acronym |
+ +------+-------------------------------------------------------+
Options
-------
The following flake8 options are added:
- --ignore-names Ignore errors for specific variable names.
+ --ignore-names Ignore errors for specific names or glob
patterns.
- Currently, this option can only be used
for N802, N803, N806, N815, and N816 errors.
+ Currently, this option can only be used
for N802, N803, N804, N805, N806, N815, and N816 errors.
Default:
``setUp,tearDown,setUpClass,tearDownClass,setUpTestData,failureException,longMessage,maxDiff``.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pep8-naming-0.9.1/src/pep8_naming.egg-info/SOURCES.txt
new/pep8-naming-0.10.0/src/pep8_naming.egg-info/SOURCES.txt
--- old/pep8-naming-0.9.1/src/pep8_naming.egg-info/SOURCES.txt 2019-11-14
18:59:28.000000000 +0100
+++ new/pep8-naming-0.10.0/src/pep8_naming.egg-info/SOURCES.txt 2020-03-20
22:24:16.000000000 +0100
@@ -31,6 +31,7 @@
testsuite/N806_py2.py
testsuite/N806_py3.py
testsuite/N806_py35.py
+testsuite/N806_py38.py
testsuite/N807.py
testsuite/N807_py3.py
testsuite/N807_py35.py
@@ -39,5 +40,7 @@
testsuite/N816.py
testsuite/N816_py3.py
testsuite/N816_py37.py
+testsuite/N816_py38.py
testsuite/N81x.py
-testsuite/N81x_py3.py
\ No newline at end of file
+testsuite/N81x_py3.py
+testsuite/N8xx_py36.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/src/pep8ext_naming.py
new/pep8-naming-0.10.0/src/pep8ext_naming.py
--- old/pep8-naming-0.9.1/src/pep8ext_naming.py 2019-11-14 18:59:02.000000000
+0100
+++ new/pep8-naming-0.10.0/src/pep8ext_naming.py 2020-03-20
22:13:50.000000000 +0100
@@ -2,7 +2,9 @@
"""Checker of PEP-8 Naming Conventions."""
import sys
from collections import deque
+from fnmatch import fnmatch
from functools import partial
+from itertools import chain
from flake8_polyfill import options
@@ -12,7 +14,7 @@
except ImportError:
from flake8.util import ast, iter_child_nodes
-__version__ = '0.9.1'
+__version__ = '0.10.0'
PYTHON_VERSION = sys.version_info[:3]
PY2 = PYTHON_VERSION[0] == 2
@@ -78,6 +80,10 @@
return lineno, col_offset + 1, '%s %s' % (code, code_str), self
+def _ignored(name, ignore):
+ return any(fnmatch(name, i) for i in ignore)
+
+
BaseASTCheck = _ASTCheckMeta('BaseASTCheck', (object,),
{'__doc__': "Base for AST Checks.", 'err': _err})
@@ -132,8 +138,8 @@
type='string',
parse_from_config=True,
comma_separated_list=True,
- help='List of names the pep8-naming plugin should '
- 'ignore. (Defaults to %default)')
+ help='List of names or glob patterns the pep8-naming '
+ 'plugin should ignore. (Defaults to %default)')
options.register(parser, '--classmethod-decorators',
default=_default_classmethod_decorators,
@@ -207,11 +213,15 @@
if isinstance(meth, ast.Name):
late_decoration[meth.id] = self.decorator_to_type[func_name]
- cls_bases = [b for b in cls_node.bases if isinstance(b, ast.Name)]
- # If this class inherits from `type`, it's a metaclass, and we'll
- # consider all of it's methods to be classmethods.
- ismetaclass = any(
- name for name in cls_bases if name.id in METACLASS_BASES)
+ # If this class inherits from a known metaclass base class, it is
+ # itself a metaclass, and we'll consider all of it's methods to be
+ # classmethods.
+ bases = chain(
+ (b.id for b in cls_node.bases if isinstance(b, ast.Name)),
+ (b.attr for b in cls_node.bases if isinstance(b, ast.Attribute)),
+ )
+ ismetaclass = any(name for name in bases if name in METACLASS_BASES)
+
self.set_function_nodes_types(
iter_child_nodes(cls_node), ismetaclass, late_decoration)
@@ -260,7 +270,7 @@
def visit_classdef(self, node, parents, ignore=None):
name = node.name
- if ignore and name in ignore:
+ if _ignored(name, ignore):
return
name = name.strip('_')
if not name[:1].isupper() or '_' in name:
@@ -283,7 +293,7 @@
def visit_functiondef(self, node, parents, ignore=None):
function_type = getattr(node, 'function_type', _FunctionType.FUNCTION)
name = node.name
- if ignore and name in ignore:
+ if _ignored(name, ignore):
return
if name in ('__dir__', '__getattr__'):
return
@@ -317,9 +327,9 @@
return node, arg
for arg, name in arg_name(node.args.vararg), arg_name(node.args.kwarg):
- if name in ignore:
- continue
- if name is not None and name.lower() != name:
+ if name is None or _ignored(name, ignore):
+ continue
+ if name.lower() != name:
yield self.err(arg, 'N803', name=name)
return
@@ -330,13 +340,13 @@
function_type = getattr(node, 'function_type', _FunctionType.FUNCTION)
if function_type == _FunctionType.METHOD:
- if name0 != 'self':
+ if name0 != 'self' and not _ignored(name0, ignore):
yield self.err(arg0, 'N805')
elif function_type == _FunctionType.CLASSMETHOD:
- if name0 != 'cls':
+ if name0 != 'cls' and not _ignored(name0, ignore):
yield self.err(arg0, 'N804')
for arg, name in arg_name_tuples:
- if name.lower() != name and name not in ignore:
+ if name.lower() != name and not _ignored(name, ignore):
yield self.err(arg, 'N803', name=name)
return
@@ -351,6 +361,7 @@
N812 = "lowercase '{name}' imported as non lowercase '{asname}'"
N813 = "camelcase '{name}' imported as lowercase '{asname}'"
N814 = "camelcase '{name}' imported as constant '{asname}'"
+ N817 = "camelcase '{name}' imported as acronym '{asname}'"
def visit_importfrom(self, node, parents, ignore=None):
for name in node.names:
@@ -368,7 +379,10 @@
elif asname.islower():
yield self.err(node, 'N813', **err_kwargs)
elif asname.isupper():
- yield self.err(node, 'N814', **err_kwargs)
+ if ''.join(filter(str.isupper, original_name)) == asname:
+ yield self.err(node, 'N817', **err_kwargs)
+ else:
+ yield self.err(node, 'N814', **err_kwargs)
visit_import = visit_importfrom
@@ -392,24 +406,38 @@
else:
checker = self.global_variable_check
for name in _extract_names(assignment_target):
- if name in ignore:
+ if _ignored(name, ignore):
continue
error_code = checker(name)
if error_code:
yield self.err(assignment_target, error_code, name=name)
+ @staticmethod
+ def is_namedtupe(node_value):
+ if isinstance(node_value, ast.Call):
+ if isinstance(node_value.func, ast.Attribute):
+ if node_value.func.attr == 'namedtuple':
+ return True
+ elif isinstance(node_value.func, ast.Name):
+ if node_value.func.id == 'namedtuple':
+ return True
+ return False
+
def visit_assign(self, node, parents, ignore=None):
- if isinstance(node.value, ast.Call):
- if isinstance(node.value.func, ast.Attribute):
- if node.value.func.attr == 'namedtuple':
- return
- elif isinstance(node.value.func, ast.Name):
- if node.value.func.id == 'namedtuple':
- return
+ if self.is_namedtupe(node.value):
+ return
for target in node.targets:
for error in self._find_errors(target, parents, ignore):
yield error
+ def visit_namedexpr(self, node, parents, ignore):
+ if self.is_namedtupe(node.value):
+ return
+ for error in self._find_errors(node.target, parents, ignore):
+ yield error
+
+ visit_annassign = visit_namedexpr
+
def visit_with(self, node, parents, ignore):
if PY2:
for error in self._find_errors(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N801.py
new/pep8-naming-0.10.0/testsuite/N801.py
--- old/pep8-naming-0.9.1/testsuite/N801.py 2019-02-05 17:53:45.000000000
+0100
+++ new/pep8-naming-0.10.0/testsuite/N801.py 2020-02-07 00:56:42.000000000
+0100
@@ -4,6 +4,9 @@
#: Okay(--ignore-names=notok)
class notok(object):
pass
+#: Okay(--ignore-names=*ok)
+class notok(object):
+ pass
#: N801
class Good(object):
class notok(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N802.py
new/pep8-naming-0.10.0/testsuite/N802.py
--- old/pep8-naming-0.9.1/testsuite/N802.py 2019-02-05 17:53:45.000000000
+0100
+++ new/pep8-naming-0.10.0/testsuite/N802.py 2020-02-07 00:56:42.000000000
+0100
@@ -22,6 +22,9 @@
#: Okay(--ignore-names=NotOK)
def NotOK():
pass
+#: Okay(--ignore-names=*OK)
+def NotOK():
+ pass
#: Okay
def _():
pass
@@ -45,6 +48,10 @@
class ClassName(object):
def notOk(self):
pass
+#: Okay(--ignore-names=*Ok)
+class ClassName(object):
+ def notOk(self):
+ pass
#: Okay
def setUp():
pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N803.py
new/pep8-naming-0.10.0/testsuite/N803.py
--- old/pep8-naming-0.9.1/testsuite/N803.py 2019-07-17 00:45:19.000000000
+0200
+++ new/pep8-naming-0.10.0/testsuite/N803.py 2020-02-07 00:56:42.000000000
+0100
@@ -37,6 +37,9 @@
#: N803
def b13(BAD, *VERYBAD, **EXTRABAD):
pass
+#: Okay(--ignore-names=*BAD)
+def b13(BAD, *VERYBAD, **EXTRABAD):
+ pass
#: N803:1:9
def b14(BAD):
pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N804.py
new/pep8-naming-0.10.0/testsuite/N804.py
--- old/pep8-naming-0.9.1/testsuite/N804.py 2019-07-17 18:28:29.000000000
+0200
+++ new/pep8-naming-0.10.0/testsuite/N804.py 2020-02-25 20:11:35.000000000
+0100
@@ -16,6 +16,16 @@
def __init_subclass(self, ads):
pass
+#: Okay(--ignore-names=klass)
+class SpecialConventionCase(object):
+ @classmethod
+ def prepare_meta(klass, root):
+ pass
+#: Okay(--ignore-names=_*)
+class SpecialConventionCase(object):
+ @classmethod
+ def prepare_meta(_class, root):
+ pass
#: N804:3:14(--classmethod-decorators=clazzy,cool)
class NewClassIsRequired(object):
@cool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N805.py
new/pep8-naming-0.10.0/testsuite/N805.py
--- old/pep8-naming-0.9.1/testsuite/N805.py 2019-07-17 18:28:29.000000000
+0200
+++ new/pep8-naming-0.10.0/testsuite/N805.py 2020-02-26 18:29:19.000000000
+0100
@@ -1,3 +1,4 @@
+import abc
from abc import ABCMeta
#: Okay
@@ -17,6 +18,14 @@
def bad(ads, self):
pass
+#: Okay(--ignore-names=a*)
+class Foo(object):
+ def bad(ads, self):
+ pass
+#: Okay(--ignore-names=source)
+class GraphQLNode(object):
+ def resolve_foo(source, info):
+ pass
#: Okay
class Foo(object):
def __new__(cls):
@@ -53,6 +62,12 @@
def __new__(cls, name, bases, attrs):
pass
def test(cls):
+ pass
+#: Okay
+class Meta(abc.ABCMeta):
+ def __new__(cls, name, bases, attrs):
+ pass
+ def test(cls):
pass
#: Okay(--classmethod-decorators=clazzy,cool)
class NewClassmethodDecorators(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N806.py
new/pep8-naming-0.10.0/testsuite/N806.py
--- old/pep8-naming-0.9.1/testsuite/N806.py 2019-02-05 17:53:45.000000000
+0100
+++ new/pep8-naming-0.10.0/testsuite/N806.py 2020-02-07 00:56:42.000000000
+0100
@@ -25,6 +25,12 @@
#: Okay(--ignore-names=Bad)
def test():
Bad = 1
+#: N806(--ignore-names=A*)
+def test():
+ Bad = 1
+#: Okay(--ignore-names=B*)
+def test():
+ Bad = 1
#: Okay
def good():
global Bad
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N806_py38.py
new/pep8-naming-0.10.0/testsuite/N806_py38.py
--- old/pep8-naming-0.9.1/testsuite/N806_py38.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pep8-naming-0.10.0/testsuite/N806_py38.py 2020-03-20
21:34:22.000000000 +0100
@@ -0,0 +1,19 @@
+# python_version >= '3.8'
+#: Okay
+def f1(values):
+ total = 0
+ partial_sums = [total := total + v for v in values]
+ return partial_sums, total
+#: Okay
+GLOBAL_VAR = 0
+def f2(values):
+ global GLOBAL_VAR
+ partial_sums = [GLOBAL_VAR := GLOBAL_VAR + v for v in values]
+ return partial_sums, GLOBAL_VAR
+#: N806:2:16
+def f():
+ return 1, (BaD_WalRuS := 1), BaD_WalRuS + 1
+#: Okay
+def f():
+ (NamedTuple := namedtuple('NamedTuple', 'f1 f2'))
+ return NamedTuple
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N807.py
new/pep8-naming-0.10.0/testsuite/N807.py
--- old/pep8-naming-0.9.1/testsuite/N807.py 2019-02-20 16:48:05.000000000
+0100
+++ new/pep8-naming-0.10.0/testsuite/N807.py 2020-02-07 00:56:42.000000000
+0100
@@ -49,6 +49,9 @@
#: Okay(--ignore-names=__bad)
def __bad():
pass
+#: Okay(--ignore-names=__*)
+def __bad():
+ pass
#: Okay
def __dir__():
pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N815.py
new/pep8-naming-0.10.0/testsuite/N815.py
--- old/pep8-naming-0.9.1/testsuite/N815.py 2019-02-05 17:53:45.000000000
+0100
+++ new/pep8-naming-0.10.0/testsuite/N815.py 2020-02-07 00:56:42.000000000
+0100
@@ -22,3 +22,6 @@
#: Okay(--ignore-names=mixed_Case)
class C:
mixed_Case = 0
+#: Okay(--ignore-names=*Case)
+class C:
+ mixed_Case = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N816.py
new/pep8-naming-0.10.0/testsuite/N816.py
--- old/pep8-naming-0.9.1/testsuite/N816.py 2019-02-05 17:53:45.000000000
+0100
+++ new/pep8-naming-0.10.0/testsuite/N816.py 2020-02-07 00:56:42.000000000
+0100
@@ -20,3 +20,5 @@
C_6 = 0.
#: Okay(--ignore-names=mixedCase)
mixedCase = 0
+#: Okay(--ignore-names=*Case)
+mixedCase = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N816_py38.py
new/pep8-naming-0.10.0/testsuite/N816_py38.py
--- old/pep8-naming-0.9.1/testsuite/N816_py38.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pep8-naming-0.10.0/testsuite/N816_py38.py 2020-03-20
21:34:22.000000000 +0100
@@ -0,0 +1,5 @@
+# python_version >= '3.8'
+#: Okay
+lambda f: (TheName := namedtuple('TheName', 'a b c')), TheName
+#: N816:1:15:
+lambda line: (BaD_WaLRuS := re.match(pattern, line)) and BaD_WaLRuS.group(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N81x.py
new/pep8-naming-0.10.0/testsuite/N81x.py
--- old/pep8-naming-0.9.1/testsuite/N81x.py 2019-01-28 20:09:31.000000000
+0100
+++ new/pep8-naming-0.10.0/testsuite/N81x.py 2020-02-04 21:31:48.000000000
+0100
@@ -16,3 +16,5 @@
from mod import CamelCase as noncamle
#: N814:1:1
from mod import CamelCase as CONSTANT
+#: N817:1:1
+from mod import CamelCase as CC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pep8-naming-0.9.1/testsuite/N8xx_py36.py
new/pep8-naming-0.10.0/testsuite/N8xx_py36.py
--- old/pep8-naming-0.9.1/testsuite/N8xx_py36.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pep8-naming-0.10.0/testsuite/N8xx_py36.py 2020-03-20
21:34:22.000000000 +0100
@@ -0,0 +1,16 @@
+# python_version >= '3.6'
+#: Okay
+var1: int = 1
+var2: int
+def some():
+ variable: int = 1
+class Test(object):
+ variable: int = 1
+#: N816:1:1
+mixedCase: int = 1
+#: N806:2:5
+def some():
+ mixedCase: int = 1
+#: N815:2:5
+class Test(object):
+ mixedCase: int = 1