Patchwork D7268: hghave: add a check for pytype, Google's Python type checker

login
register
mail settings
Submitter phabricator
Date Nov. 7, 2019, 8:32 a.m.
Message ID <019eefdd95c3c918fb3cb4cfc9967785@localhost.localdomain>
Download mbox | patch
Permalink /patch/42868/
State Not Applicable
Headers show

Comments

phabricator - Nov. 7, 2019, 8:32 a.m.
Closed by commit rHG32ac4d0b4102: hghave: add a check for pytype, Google&#039;s Python type checker (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7268?vs=17638&id=17685

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7268/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7268

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -1000,3 +1000,11 @@ 
     version = matchoutput(blackcmd, version_regex)
     sv = distutils.version.StrictVersion
     return version and sv(_strpath(version.group(1))) >= sv('19.10b0')
+
+
+@check('pytype', 'the pytype type checker')
+def has_pytype():
+    pytypecmd = 'pytype --version'
+    version = matchoutput(pytypecmd, b'[0-9a-b.]+')
+    sv = distutils.version.StrictVersion
+    return version and sv(_strpath(version.group(0))) >= sv('2019.10.17')