Disable mercurial demandimport in _pyflakes module

Disabling in hooks is too late since mercurial already imports
_pyflakes before.

Fixes #88
This commit is contained in:
Florian Rathgeber 2014-03-23 18:35:08 +00:00
parent 19252c0404
commit 45c7138907
2 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,10 @@
# -*- coding: utf-8 -*-
try:
# The 'demandimport' breaks pyflakes and flake8._pyflakes
from mercurial import demandimport
demandimport.disable()
except ImportError:
pass
import pyflakes
import pyflakes.checker

View file

@ -6,12 +6,6 @@ import stat
from subprocess import Popen, PIPE
import shutil
from tempfile import mkdtemp
try:
# The 'demandimport' breaks pyflakes and flake8._pyflakes
from mercurial import demandimport
demandimport.disable()
except ImportError:
pass
try:
from configparser import ConfigParser
except ImportError: # Python 2