mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 18:56:53 +00:00
Use try/except/else to disable demandimport
This commit is contained in:
parent
45c7138907
commit
c1db99e4f2
1 changed files with 2 additions and 1 deletions
|
|
@ -2,9 +2,10 @@
|
|||
try:
|
||||
# The 'demandimport' breaks pyflakes and flake8._pyflakes
|
||||
from mercurial import demandimport
|
||||
demandimport.disable()
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
demandimport.disable()
|
||||
import pyflakes
|
||||
import pyflakes.checker
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue