コード例 #1
0
ファイル: test_api.py プロジェクト: yamatogun/pyflakes
 def runPyflakes(self, paths, stdin=None):
     try:
         with SysStreamCapturing(stdin) as capture:
             main(args=paths)
     except SystemExit as e:
         return (capture.output, capture.error, e.code)
     else:
         raise RuntimeError("SystemExit not raised")
コード例 #2
0
 def runPyflakes(self, paths, stdin=None):
     try:
         with SysStreamCapturing(stdin) as capture:
             main(args=paths)
     except SystemExit as e:
         return (capture.output, capture.error, e.code)
     else:
         raise RuntimeError('SystemExit not raised')
コード例 #3
0
ファイル: test_api.py プロジェクト: taratran/swe-project
 def runPyflakes(self, paths, stdin=None):
     try:
         with SysStreamCapturing(stdin) as capture:
             main(args=paths)
     except SystemExit as e:
         self.assertIsInstance(e.code, bool)
         rv = int(e.code)
         return (capture.output, capture.error, rv)
     else:
         raise RuntimeError("SystemExit not raised")
コード例 #4
0
ファイル: test_api.py プロジェクト: HeitorGonzaga/simple_list
 def runPyflakes(self, paths, stdin=None):
     try:
         with SysStreamCapturing(stdin) as capture:
             main(args=paths)
     except SystemExit as e:
         self.assertIsInstance(e.code, bool)
         rv = int(e.code)
         return (capture.output, capture.error, rv)
     else:
         raise RuntimeError('SystemExit not raised')
コード例 #5
0
ファイル: __main__.py プロジェクト: Even8090/hrv_features
from pyflakes.api import main

# python -m pyflakes
if __name__ == '__main__':
    main(prog='pyflakes')
コード例 #6
0
from __future__ import print_function
import os
from pyflakes.api import main

def get_filenames():
    for dirpath, dirnames, filenames in os.walk("src"):
        if dirpath.endswith("__pycache__"):
            continue
        for rel_fn in filenames:
            if not rel_fn.endswith(".py"):
                continue
            fn = os.path.join(dirpath, rel_fn)
            if fn in [os.path.join("src", "header.py"),
                      os.path.join("src", "git", "long_header.py"),
                      ]:
                continue
            print("pyflakes on:", fn)
            yield fn

main(args=list(get_filenames()))
コード例 #7
0
import os
from pyflakes.api import main


def get_filenames():
    for dirpath, dirnames, filenames in os.walk("src"):
        if dirpath.endswith("__pycache__"):
            continue
        for rel_fn in filenames:
            if not rel_fn.endswith(".py"):
                continue
            fn = os.path.join(dirpath, rel_fn)
            if fn in [
                    os.path.join("src", "header.py"),
                    os.path.join("src", "git", "long_header.py"),
            ]:
                continue
            print("pyflakes on:", fn)
            yield fn


main(args=list(get_filenames()))
コード例 #8
0
ファイル: pyflakes-script.py プロジェクト: Mayfifth/Scripts
if __name__ == '__main__':
    import sys
    from pyflakes.api import main

    sys.exit(main())
コード例 #9
0
from pyflakes.api import main

# python -m pyflakes
if __name__ == "__main__":
    main(prog="pyflakes")
コード例 #10
0
from pyflakes.api import main
# python -m pyflakes (with Python >= 2.7)
if __name__ == '__main__':
    main(prog='pyflakes')
コード例 #11
0
"""