[med-svn] [Git][med-team/mypy][master] 4 commits: New upstream version 0.921

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Tue Dec 21 21:54:28 GMT 2021



Michael R. Crusoe pushed to branch master at Debian Med / mypy


Commits:
e695ba16 by Michael R. Crusoe at 2021-12-21T21:03:58+01:00
New upstream version 0.921
- - - - -
90f9800c by Michael R. Crusoe at 2021-12-21T21:03:58+01:00
routine-update: New upstream version

- - - - -
005999d0 by Michael R. Crusoe at 2021-12-21T21:04:09+01:00
Update upstream source from tag 'upstream/0.921'

Update to upstream version '0.921'
with Debian dir c9396c384352a3b381572e9705bb6367f7d9c473
- - - - -
69111c4b by Michael R. Crusoe at 2021-12-21T21:22:05+01:00
fix changelog & ready to upload to unstable

- - - - -


10 changed files:

- PKG-INFO
- debian/changelog
- mypy.egg-info/PKG-INFO
- mypy/checkexpr.py
- mypy/typeshed/stdlib/_curses.pyi
- mypy/typeshed/stdlib/os/__init__.pyi
- mypy/util.py
- mypy/version.py
- test-data/unit/check-functions.test
- test-data/unit/check-redefine.test


Changes:

=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: mypy
-Version: 0.920
+Version: 0.921
 Summary: Optional static typing for Python
 Home-page: http://www.mypy-lang.org/
 Author: Jukka Lehtosalo


=====================================
debian/changelog
=====================================
@@ -1,8 +1,13 @@
-mypy (0.920-1) UNRELEASED; urgency=medium
+mypy (0.921-1) unstable; urgency=medium
 
   * New upstream version
+  * debian/rules: skip testErrorOutput for now
+  * debian/patches/python3.10.1{,_part2}: cherry-pick patches from upstream
+    for Python 3.10.1 compat.
+  * debian/control: add tomli build-dep
+  * debian/patches: small refresh
 
- -- Michael R. Crusoe <crusoe at debian.org>  Thu, 16 Dec 2021 10:27:57 +0100
+ -- Michael R. Crusoe <crusoe at debian.org>  Tue, 21 Dec 2021 21:04:13 +0100
 
 mypy (0.910-4) unstable; urgency=medium
 


=====================================
mypy.egg-info/PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: mypy
-Version: 0.920
+Version: 0.921
 Summary: Optional static typing for Python
 Home-page: http://www.mypy-lang.org/
 Author: Jukka Lehtosalo


=====================================
mypy/checkexpr.py
=====================================
@@ -1,6 +1,5 @@
 """Expression type checker. This file is conceptually part of TypeChecker."""
 
-from mypy.util import unnamed_function
 from mypy.backports import OrderedDict, nullcontext
 from contextlib import contextmanager
 import itertools
@@ -337,12 +336,6 @@ class ExpressionChecker(ExpressionVisitor[Type]):
                 and callee_type.implicit):
             self.msg.untyped_function_call(callee_type, e)
 
-        if (isinstance(callee_type, CallableType)
-                and not callee_type.is_type_obj()
-                and unnamed_function(callee_type.name)):
-            self.msg.underscore_function_call(e)
-            return AnyType(TypeOfAny.from_error)
-
         # Figure out the full name of the callee for plugin lookup.
         object_type = None
         member = None


=====================================
mypy/typeshed/stdlib/_curses.pyi
=====================================
@@ -344,7 +344,7 @@ def termattrs() -> int: ...
 def termname() -> bytes: ...
 def tigetflag(__capname: str) -> int: ...
 def tigetnum(__capname: str) -> int: ...
-def tigetstr(__capname: str) -> bytes: ...
+def tigetstr(__capname: str) -> bytes | None: ...
 def tparm(
     __str: bytes,
     __i1: int = ...,


=====================================
mypy/typeshed/stdlib/os/__init__.pyi
=====================================
@@ -309,8 +309,6 @@ class stat_result:
 @runtime_checkable
 class PathLike(Protocol[_AnyStr_co]):
     def __fspath__(self) -> _AnyStr_co: ...
-    if sys.version_info >= (3, 9):
-        def __class_getitem__(cls, item: Any) -> GenericAlias: ...
 
 _FdOrAnyPath = Union[int, StrOrBytesPath]
 


=====================================
mypy/util.py
=====================================
@@ -566,11 +566,12 @@ class FancyFormatter:
         under = curses.tigetstr('smul')
         set_color = curses.tigetstr('setaf')
         set_eseq = curses.tigetstr('cup')
+        normal = curses.tigetstr('sgr0')
 
-        if not (bold and under and set_color and set_eseq):
+        if not (bold and under and set_color and set_eseq and normal):
             return False
 
-        self.NORMAL = curses.tigetstr('sgr0').decode()
+        self.NORMAL = normal.decode()
         self.BOLD = bold.decode()
         self.UNDER = under.decode()
         self.DIM = parse_gray_color(set_eseq)


=====================================
mypy/version.py
=====================================
@@ -5,7 +5,7 @@ from mypy import git
 # - Release versions have the form "0.NNN".
 # - Dev versions have the form "0.NNN+dev" (PLUS sign to conform to PEP 440).
 # - For 1.0 we'll switch back to 1.2.3 form.
-__version__ = '0.920'
+__version__ = '0.921'
 base_version = __version__
 
 mypy_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))


=====================================
test-data/unit/check-functions.test
=====================================
@@ -2230,6 +2230,12 @@ reveal_type(h) # N: Revealed type is "builtins.function"
 h(7) # E: Cannot call function of unknown type
 [builtins fixtures/bool.pyi]
 
+[case testFunctionWithNameUnderscore]
+def _(x: int) -> None: pass
+
+_(1)
+_('x')  # E: Argument 1 to "_" has incompatible type "str"; expected "int"
+
 -- Positional-only arguments
 -- -------------------------
 


=====================================
test-data/unit/check-redefine.test
=====================================
@@ -498,7 +498,8 @@ def _(arg: str):
 def _(arg: int) -> int:
     return 'a' # E: Incompatible return value type (got "str", expected "int")
 
-[case testCallingUnderscoreFunctionIsNotAllowed]
+[case testCallingUnderscoreFunctionIsNotAllowed-skip]
+# Skipped because of https://github.com/python/mypy/issues/11774
 def _(arg: str) -> None:
     pass
 



View it on GitLab: https://salsa.debian.org/med-team/mypy/-/compare/2b8fcef5b0ab8b3196c61ce70f2c9b3d24195499...69111c4ba073fdedb2a1d99a1ce93292d543be98

-- 
View it on GitLab: https://salsa.debian.org/med-team/mypy/-/compare/2b8fcef5b0ab8b3196c61ce70f2c9b3d24195499...69111c4ba073fdedb2a1d99a1ce93292d543be98
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211221/34b48a8e/attachment-0001.htm>


More information about the debian-med-commit mailing list