Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-flake8-bugbear for 
openSUSE:Factory checked in at 2022-12-16 17:51:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flake8-bugbear (Old)
 and      /work/SRC/openSUSE:Factory/.python-flake8-bugbear.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-flake8-bugbear"

Fri Dec 16 17:51:40 2022 rev:10 rq:1043218 version:22.12.6

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-flake8-bugbear/python-flake8-bugbear.changes  
    2022-10-27 13:55:09.512869342 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-flake8-bugbear.new.1835/python-flake8-bugbear.changes
    2022-12-16 17:51:48.540069606 +0100
@@ -1,0 +2,7 @@
+Thu Dec 15 20:59:46 UTC 2022 - Dirk Müller <[email protected]>
+
+- update to 22.12.6 (bsc#1206225):
+  * Add B905: `zip()` without an explicit `strict=` parameter. (#314)
+  * B027: ignore @overload when typing is imported with other names (#309)
+
+-------------------------------------------------------------------

Old:
----
  flake8-bugbear-22.10.27.tar.gz

New:
----
  flake8-bugbear-22.12.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-flake8-bugbear.spec ++++++
--- /var/tmp/diff_new_pack.sFkQRl/_old  2022-12-16 17:51:49.008072182 +0100
+++ /var/tmp/diff_new_pack.sFkQRl/_new  2022-12-16 17:51:49.016072226 +0100
@@ -19,7 +19,7 @@
 %define skip_python2 1
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-flake8-bugbear
-Version:        22.10.27
+Version:        22.12.6
 Release:        0
 Summary:        A plugin for flake8 finding likely bugs and design problems in 
your program
 License:        MIT

++++++ flake8-bugbear-22.10.27.tar.gz -> flake8-bugbear-22.12.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flake8-bugbear-22.10.27/PKG-INFO 
new/flake8-bugbear-22.12.6/PKG-INFO
--- old/flake8-bugbear-22.10.27/PKG-INFO        2022-10-27 00:37:28.730224100 
+0200
+++ new/flake8-bugbear-22.12.6/PKG-INFO 2022-12-06 20:07:00.203865300 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: flake8-bugbear
-Version: 22.10.27
+Version: 22.12.6
 Summary: A plugin for flake8 finding likely bugs and design problems in your 
program. Contains warnings that don't belong in pyflakes and pycodestyle.
 Author-email: Łukasz Langa <[email protected]>
 License: MIT
@@ -229,6 +229,11 @@
 See `the exception chaining tutorial 
<https://docs.python.org/3/tutorial/errors.html#exception-chaining>`_
 for details.
 
+**B905**: ``zip()`` without an explicit `strict=` parameter set. 
``strict=True`` causes the resulting iterator
+to raise a ``ValueError`` if the arguments are exhausted at differing lengths. 
The ``strict=`` argument
+was added in Python 3.10, so don't enable this flag for code that should work 
on <3.10.
+For more information: https://peps.python.org/pep-0618/
+
 **B950**: Line too long. This is a pragmatic equivalent of
 ``pycodestyle``'s ``E501``: it considers "max-line-length" but only triggers
 when the value has been exceeded by **more than 10%**. You will no
@@ -326,6 +331,12 @@
 Change Log
 ----------
 
+22.12.6
+~~~~~~~~~
+
+* Add B905: `zip()` without an explicit `strict=` parameter. (#314)
+* B027: ignore @overload when typing is imported with other names (#309)
+
 22.10.27
 ~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flake8-bugbear-22.10.27/README.rst 
new/flake8-bugbear-22.12.6/README.rst
--- old/flake8-bugbear-22.10.27/README.rst      2022-10-27 00:37:19.000000000 
+0200
+++ new/flake8-bugbear-22.12.6/README.rst       2022-12-06 20:06:51.000000000 
+0100
@@ -200,6 +200,11 @@
 See `the exception chaining tutorial 
<https://docs.python.org/3/tutorial/errors.html#exception-chaining>`_
 for details.
 
+**B905**: ``zip()`` without an explicit `strict=` parameter set. 
``strict=True`` causes the resulting iterator
+to raise a ``ValueError`` if the arguments are exhausted at differing lengths. 
The ``strict=`` argument
+was added in Python 3.10, so don't enable this flag for code that should work 
on <3.10.
+For more information: https://peps.python.org/pep-0618/
+
 **B950**: Line too long. This is a pragmatic equivalent of
 ``pycodestyle``'s ``E501``: it considers "max-line-length" but only triggers
 when the value has been exceeded by **more than 10%**. You will no
@@ -297,6 +302,12 @@
 Change Log
 ----------
 
+22.12.6
+~~~~~~~~~
+
+* Add B905: `zip()` without an explicit `strict=` parameter. (#314)
+* B027: ignore @overload when typing is imported with other names (#309)
+
 22.10.27
 ~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flake8-bugbear-22.10.27/bugbear.py 
new/flake8-bugbear-22.12.6/bugbear.py
--- old/flake8-bugbear-22.10.27/bugbear.py      2022-10-27 00:37:19.000000000 
+0200
+++ new/flake8-bugbear-22.12.6/bugbear.py       2022-12-06 20:06:51.000000000 
+0100
@@ -12,7 +12,7 @@
 import attr
 import pycodestyle
 
-__version__ = "22.10.27"
+__version__ = "22.12.6"
 
 LOG = logging.getLogger("flake8.bugbear")
 CONTEXTFUL_NODES = (
@@ -356,6 +356,7 @@
 
             self.check_for_b026(node)
 
+        self.check_for_b905(node)
         self.generic_visit(node)
 
     def visit_Assign(self, node):
@@ -671,10 +672,7 @@
 
         def is_overload(expr):
             return (isinstance(expr, ast.Name) and expr.id == "overload") or (
-                isinstance(expr, ast.Attribute)
-                and isinstance(expr.value, ast.Name)
-                and expr.value.id == "typing"
-                and expr.attr == "overload"
+                isinstance(expr, ast.Attribute) and expr.attr == "overload"
             )
 
         def empty_body(body) -> bool:
@@ -963,6 +961,14 @@
         for duplicate in duplicates:
             self.errors.append(B025(node.lineno, node.col_offset, 
vars=(duplicate,)))
 
+    def check_for_b905(self, node):
+        if (
+            isinstance(node.func, ast.Name)
+            and node.func.id == "zip"
+            and not any(kw.arg == "strict" for kw in node.keywords)
+        ):
+            self.errors.append(B905(node.lineno, node.col_offset))
+
 
 def compose_call_path(node):
     if isinstance(node, ast.Attribute):
@@ -1239,7 +1245,7 @@
 }
 B015 = Error(
     message=(
-        "B015 Result of comparison is not used. This line doesn't do"
+        "B015 Result of comparison is not used. This line doesn't do "
         "anything. Did you intend to prepend it with assert?"
     )
 )
@@ -1363,6 +1369,8 @@
     )
 )
 
+B905 = Error(message="B905 `zip()` without an explicit `strict=` parameter.")
+
 B950 = Error(message="B950 line too long ({} > {} characters)")
 
-disabled_by_default = ["B901", "B902", "B903", "B904", "B950"]
+disabled_by_default = ["B901", "B902", "B903", "B904", "B905", "B950"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/flake8-bugbear-22.10.27/flake8_bugbear.egg-info/PKG-INFO 
new/flake8-bugbear-22.12.6/flake8_bugbear.egg-info/PKG-INFO
--- old/flake8-bugbear-22.10.27/flake8_bugbear.egg-info/PKG-INFO        
2022-10-27 00:37:28.000000000 +0200
+++ new/flake8-bugbear-22.12.6/flake8_bugbear.egg-info/PKG-INFO 2022-12-06 
20:07:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: flake8-bugbear
-Version: 22.10.27
+Version: 22.12.6
 Summary: A plugin for flake8 finding likely bugs and design problems in your 
program. Contains warnings that don't belong in pyflakes and pycodestyle.
 Author-email: Łukasz Langa <[email protected]>
 License: MIT
@@ -229,6 +229,11 @@
 See `the exception chaining tutorial 
<https://docs.python.org/3/tutorial/errors.html#exception-chaining>`_
 for details.
 
+**B905**: ``zip()`` without an explicit `strict=` parameter set. 
``strict=True`` causes the resulting iterator
+to raise a ``ValueError`` if the arguments are exhausted at differing lengths. 
The ``strict=`` argument
+was added in Python 3.10, so don't enable this flag for code that should work 
on <3.10.
+For more information: https://peps.python.org/pep-0618/
+
 **B950**: Line too long. This is a pragmatic equivalent of
 ``pycodestyle``'s ``E501``: it considers "max-line-length" but only triggers
 when the value has been exceeded by **more than 10%**. You will no
@@ -326,6 +331,12 @@
 Change Log
 ----------
 
+22.12.6
+~~~~~~~~~
+
+* Add B905: `zip()` without an explicit `strict=` parameter. (#314)
+* B027: ignore @overload when typing is imported with other names (#309)
+
 22.10.27
 ~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/flake8-bugbear-22.10.27/flake8_bugbear.egg-info/SOURCES.txt 
new/flake8-bugbear-22.12.6/flake8_bugbear.egg-info/SOURCES.txt
--- old/flake8-bugbear-22.10.27/flake8_bugbear.egg-info/SOURCES.txt     
2022-10-27 00:37:28.000000000 +0200
+++ new/flake8-bugbear-22.12.6/flake8_bugbear.egg-info/SOURCES.txt      
2022-12-06 20:07:00.000000000 +0100
@@ -45,5 +45,6 @@
 tests/b902_py38.py
 tests/b903.py
 tests/b904.py
+tests/b905_py310.py
 tests/b950.py
 tests/test_bugbear.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flake8-bugbear-22.10.27/tests/b027.py 
new/flake8-bugbear-22.12.6/tests/b027.py
--- old/flake8-bugbear-22.10.27/tests/b027.py   2022-10-27 00:37:19.000000000 
+0200
+++ new/flake8-bugbear-22.12.6/tests/b027.py    2022-12-06 20:06:51.000000000 
+0100
@@ -60,7 +60,10 @@
 
 
 # ignore @overload, fixes issue #304
+# ignore overload with other imports, fixes #308
 import typing
+import typing as t
+import typing as anything
 from typing import Union, overload
 
 
@@ -73,6 +76,14 @@
     def empty_1(self, foo: int):
         ...
 
+    @t.overload
+    def empty_1(self, foo: list):
+        ...
+
+    @anything.overload
+    def empty_1(self, foo: float):
+        ...
+
     @abstractmethod
-    def empty_1(self, foo: Union[str, int]):
+    def empty_1(self, foo: Union[str, int, list, float]):
         ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flake8-bugbear-22.10.27/tests/b905_py310.py 
new/flake8-bugbear-22.12.6/tests/b905_py310.py
--- old/flake8-bugbear-22.10.27/tests/b905_py310.py     1970-01-01 
01:00:00.000000000 +0100
+++ new/flake8-bugbear-22.12.6/tests/b905_py310.py      2022-12-06 
20:06:51.000000000 +0100
@@ -0,0 +1,10 @@
+zip()
+zip(range(3))
+zip("a", "b")
+zip("a", "b", *zip("c"))
+zip(zip("a"), strict=False)
+zip(zip("a", strict=True))
+
+zip(range(3), strict=True)
+zip("a", "b", strict=False)
+zip("a", "b", "c", strict=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flake8-bugbear-22.10.27/tests/test_bugbear.py 
new/flake8-bugbear-22.12.6/tests/test_bugbear.py
--- old/flake8-bugbear-22.10.27/tests/test_bugbear.py   2022-10-27 
00:37:19.000000000 +0200
+++ new/flake8-bugbear-22.12.6/tests/test_bugbear.py    2022-12-06 
20:06:51.000000000 +0100
@@ -42,6 +42,7 @@
     B902,
     B903,
     B904,
+    B905,
     B950,
     BugBearChecker,
     BugBearVisitor,
@@ -297,7 +298,7 @@
     def test_b020(self):
         filename = Path(__file__).absolute().parent / "b020.py"
         bbc = BugBearChecker(filename=str(filename))
-        errors = list(bbc.run())
+        errors = list(e for e in bbc.run() if e[2][:4] == "B020")
         self.assertEqual(
             errors,
             self.errors(
@@ -484,6 +485,22 @@
         ]
         self.assertEqual(errors, self.errors(*expected))
 
+    @unittest.skipIf(sys.version_info < (3, 10), "requires 3.10+")
+    def test_b905(self):
+        filename = Path(__file__).absolute().parent / "b905_py310.py"
+        bbc = BugBearChecker(filename=str(filename))
+        errors = list(bbc.run())
+        expected = [
+            B905(1, 0),
+            B905(2, 0),
+            B905(3, 0),
+            B905(4, 0),
+            B905(4, 15),
+            B905(5, 4),
+            B905(6, 0),
+        ]
+        self.assertEqual(errors, self.errors(*expected))
+
     def test_b950(self):
         filename = Path(__file__).absolute().parent / "b950.py"
         bbc = BugBearChecker(filename=str(filename))

Reply via email to