Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/logcmdutil.py @ 43793: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 | c9301ac73b95 |
children | 064c9a4ced4a |
comparison
equal
deleted
inserted
replaced
43792:ee3872c14ab3 | 43793:7b14d649af1b |
---|---|
40 dateutil, | 40 dateutil, |
41 stringutil, | 41 stringutil, |
42 ) | 42 ) |
43 | 43 |
44 | 44 |
45 if not globals(): | 45 if pycompat.TYPE_CHECKING: |
46 from typing import ( | 46 from typing import ( |
47 Any, | 47 Any, |
48 Tuple, | 48 Tuple, |
49 ) | 49 ) |
50 | 50 |