File: run_pyflakes_src.py

package info (click to toggle)
python-versioneer 0.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 648 kB
  • sloc: python: 2,656; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 598 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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()))