# HG changeset patch # User Yuya Nishihara # Date 2019-11-11 13:10:26 # Node ID 0ad5d6c4bfadd83f11d91941036a55e1781785f4 # Parent ecd11c4d3834b7602d9bdc6f27ba1f4fc07911a1 import-checker: allow 'from typing import ...' Suppresses the following error in test-check-module-imports.t: mercurial/encoding.py:24: relative import of stdlib module diff --git a/contrib/import-checker.py b/contrib/import-checker.py --- a/contrib/import-checker.py +++ b/contrib/import-checker.py @@ -535,6 +535,8 @@ def verify_modern_convention(module, roo if fullname != '__future__': if not fullname or ( fullname in stdlib_modules + # allow standard 'from typing import ...' style + and fullname != 'typing' and fullname not in localmods and fullname + '.__init__' not in localmods ):