From ac5916c1707bbd0d4062aaf90bac49b0042d74a0 Mon Sep 17 00:00:00 2001 From: alvarocaceres Date: Tue, 19 Jul 2016 09:43:35 -0500 Subject: [PATCH] Tweak version tests to help pytype parse them (#374) --- stdlib/2and3/cmath.pyi | 2 +- stdlib/2and3/math.pyi | 2 +- tests/pytype_blacklist.txt | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/stdlib/2and3/cmath.pyi b/stdlib/2and3/cmath.pyi index ffd16107c..7e7389c00 100644 --- a/stdlib/2and3/cmath.pyi +++ b/stdlib/2and3/cmath.pyi @@ -30,5 +30,5 @@ def sqrt(x:_C) -> complex: ... def tan(x:_C) -> complex: ... def tanh(x:_C) -> complex: ... -if sys.version_info[0] >= 3: +if sys.version_info >= (3,): def isfinite(z:_C) -> bool: ... diff --git a/stdlib/2and3/math.pyi b/stdlib/2and3/math.pyi index 2595566a0..705295759 100644 --- a/stdlib/2and3/math.pyi +++ b/stdlib/2and3/math.pyi @@ -40,7 +40,7 @@ def hypot(x: float, y: float) -> float: ... if sys.version_info >= (3, 5): def isclose(a: float, b: float, rel_tol: float = ..., abs_tol: float = ...) -> bool: ... def isinf(x: float) -> bool: ... -if sys.version_info[0] >= 3: +if sys.version_info >= (3,): def isfinite(x: float) -> bool: ... def isnan(x: float) -> bool: ... def ldexp(x: float, i: int) -> float: ... diff --git a/tests/pytype_blacklist.txt b/tests/pytype_blacklist.txt index 90bbb029d..e0ca77330 100644 --- a/tests/pytype_blacklist.txt +++ b/tests/pytype_blacklist.txt @@ -30,11 +30,9 @@ 2.7/xml/etree/ElementInclude.pyi 2.7/xml/etree/ElementPath.pyi 2.7/xml/etree/ElementTree.pyi -2and3/cmath.pyi 2and3/logging/__init__.pyi 2and3/logging/config.pyi 2and3/logging/handlers.pyi -2and3/math.pyi 2and3/warnings.pyi 2and3/webbrowser.pyi