[med-svn] [Git][med-team/mypy][upstream] New upstream version 0.921
Michael R. Crusoe (@crusoe)
gitlab at salsa.debian.org
Tue Dec 21 21:54:32 GMT 2021
Michael R. Crusoe pushed to branch upstream at Debian Med / mypy
Commits:
e695ba16 by Michael R. Crusoe at 2021-12-21T21:03:58+01:00
New upstream version 0.921
- - - - -
9 changed files:
- PKG-INFO
- 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
=====================================
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/-/commit/e695ba16eaf861966079eaa5bcf213e3cdd7425e
--
View it on GitLab: https://salsa.debian.org/med-team/mypy/-/commit/e695ba16eaf861966079eaa5bcf213e3cdd7425e
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/8d03b34a/attachment-0001.htm>
More information about the debian-med-commit
mailing list