mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 19:26:52 +00:00
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:
parent
19252c0404
commit
45c7138907
2 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue