diff mercurial/state.py @ 43773:7b14d649af1b

typing: consolidate "if not globals():" trick Removes redundant inline comments. I think pycompat is good place to host this kind of constants.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 19 Nov 2019 23:49:05 +0900
parents 127d46468a45
children 5322e738be0f
line wrap: on
line diff
--- a/mercurial/state.py	Tue Nov 19 23:19:57 2019 +0900
+++ b/mercurial/state.py	Tue Nov 19 23:49:05 2019 +0900
@@ -23,11 +23,12 @@
 
 from . import (
     error,
+    pycompat,
     util,
 )
 from .utils import cborutil
 
-if not globals():
+if pycompat.TYPE_CHECKING:
     from typing import (
         Any,
         Dict,