equal
deleted
inserted
replaced
572 return getattr(os, 'geteuid', None) and os.geteuid() == 0 |
572 return getattr(os, 'geteuid', None) and os.geteuid() == 0 |
573 |
573 |
574 |
574 |
575 @check("pyflakes", "Pyflakes python linter") |
575 @check("pyflakes", "Pyflakes python linter") |
576 def has_pyflakes(): |
576 def has_pyflakes(): |
577 return matchoutput( |
577 try: |
578 "sh -c \"echo 'import re' 2>&1 | $PYTHON -m pyflakes\"", |
578 import pyflakes |
579 br"<stdin>:1: 're' imported but unused", |
579 |
580 True, |
580 pyflakes.__version__ |
581 ) |
581 except ImportError: |
|
582 return False |
|
583 else: |
|
584 return True |
582 |
585 |
583 |
586 |
584 @check("pylint", "Pylint python linter") |
587 @check("pylint", "Pylint python linter") |
585 def has_pylint(): |
588 def has_pylint(): |
586 return matchoutput("pylint --help", br"Usage: pylint", True) |
589 return matchoutput("pylint --help", br"Usage: pylint", True) |