Changeset 84
- Timestamp:
- 07/11/06 09:52:27 (2 years ago)
- Files:
-
- branches/mk/cheesecake/cheesecake_index.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mk/cheesecake/cheesecake_index.py
r83 r84 843 843 pylint_value = 0 844 844 cnt = 0 845 846 # wbg: switching cwd so that pylint works correctly regarding 847 # running it on individual modules 848 original_cwd = os.getcwd() 849 os.chdir(package_dir) 850 845 851 for pyfile in get_files_of_type(files_list, 'module'): 846 fullpath = os.path.join(package_dir, pyfile) 852 # wbg: because we change the working dir, we can use relative 853 # paths which pylint is happier about. 854 # fullpath = os.path.join(package_dir, pyfile) 855 fullpath = pyfile 847 856 path, filename = os.path.split(fullpath) 848 857 module, ext = os.path.splitext(filename) … … 856 865 score_line = output.split("\n")[-3] 857 866 s = re.search(r" (\d+\.\d+)/10", score_line) 867 858 868 # We only take positive scores into account 859 869 if s: … … 866 876 pylint_value += float(score) 867 877 cnt += 1 878 879 # wbg: switching back to the original cwd in case that's important 880 os.chdir(original_cwd) 868 881 869 882 avg_score = 0
