4312:685497be3c84 | 4315:2ebb98e99054 |
---|---|
14 | 14 |
15 try: | 15 try: |
16 from pyflakes.checker import Checker | 16 from pyflakes.checker import Checker |
17 from pyflakes.messages import ImportStarUsed | 17 from pyflakes.messages import ImportStarUsed |
18 except ImportError: | 18 except ImportError: |
19 pass | 19 Checker = None |
20 | 20 |
21 VcsConflictMarkerRe = re.compile( | 21 VcsConflictMarkerRe = re.compile( |
22 r"""^<<<<<<< .*?=======.*?>>>>>>> .*?$""", | 22 r"""^<<<<<<< .*?=======.*?>>>>>>> .*?$""", |
23 re.MULTILINE | re.DOTALL) | 23 re.MULTILINE | re.DOTALL) |
24 | 24 |
171 return [{'error': (fn, line, 0, "", error)}] | 171 return [{'error': (fn, line, 0, "", error)}] |
172 except: # this catchall is intentional | 172 except: # this catchall is intentional |
173 pass | 173 pass |
174 | 174 |
175 # pyflakes | 175 # pyflakes |
176 if not checkFlakes: | 176 if not checkFlakes or Checker is None: |
177 return [{}] | 177 return [{}] |
178 | 178 |
179 results = [] | 179 results = [] |
180 lines = codestring.splitlines() | 180 lines = codestring.splitlines() |
181 try: | 181 try: |