hgdemandimport/__init__.py
changeset 43076 2372284d9457
parent 37843 670eb4fa1b86
child 45047 40120de810ba
--- a/hgdemandimport/__init__.py	Sat Oct 05 10:29:34 2019 -0400
+++ b/hgdemandimport/__init__.py	Sun Oct 06 09:45:02 2019 -0400
@@ -30,10 +30,10 @@
     '_imp',
     '_xmlplus',
     'fcntl',
-    'nt', # pathlib2 tests the existence of built-in 'nt' module
+    'nt',  # pathlib2 tests the existence of built-in 'nt' module
     'win32com.gen_py',
-    'win32com.shell', # 'appdirs' tries to import win32com.shell
-    '_winreg', # 2.7 mimetypes needs immediate ImportError
+    'win32com.shell',  # 'appdirs' tries to import win32com.shell
+    '_winreg',  # 2.7 mimetypes needs immediate ImportError
     'pythoncom',
     # imported by tarfile, not available under Windows
     'pwd',
@@ -46,16 +46,16 @@
     # setuptools' pkg_resources.py expects "from __main__ import x" to
     # raise ImportError if x not defined
     '__main__',
-    '_ssl', # conditional imports in the stdlib, issue1964
-    '_sre', # issue4920
+    '_ssl',  # conditional imports in the stdlib, issue1964
+    '_sre',  # issue4920
     'rfc822',
     'mimetools',
-    'sqlalchemy.events', # has import-time side effects (issue5085)
+    'sqlalchemy.events',  # has import-time side effects (issue5085)
     # setuptools 8 expects this module to explode early when not on windows
     'distutils.msvc9compiler',
     '__builtin__',
     'builtins',
-    'urwid.command_map', # for pudb
+    'urwid.command_map',  # for pudb
 }
 
 _pypy = '__pypy__' in sys.builtin_module_names
@@ -71,8 +71,11 @@
 disable = demandimport.disable
 deactivated = demandimport.deactivated
 
+
 def enable():
     # chg pre-imports modules so do not enable demandimport for it
-    if ('CHGINTERNALMARK' not in os.environ
-        and os.environ.get('HGDEMANDIMPORT') != 'disable'):
+    if (
+        'CHGINTERNALMARK' not in os.environ
+        and os.environ.get('HGDEMANDIMPORT') != 'disable'
+    ):
         demandimport.enable()