PEP8 cleanups.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-04-08 04:12:14 -04:00
parent 440f96c75b
commit 27a257f010
2 changed files with 16 additions and 20 deletions

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python
import os
from os.path import join, getsize
BASE_PATH = 'mayan/apps'
@@ -18,7 +17,6 @@ def print_views_summary(module_filename):
if line.startswith('def') and 'request' in line:
count_function_based_views += 1
print ' class based views: {}'.format(count_class_based_views)
print ' function based views: {}'.format(count_function_based_views)
return count_class_based_views, count_function_based_views
@@ -29,7 +27,6 @@ def print_tests_summary(module_filename):
print ' module:', module_filename
count_tests = 0
for line in file_object:
#if 'def test' in line:
if line.startswith(' def test'):
count_tests += 1
@@ -63,7 +60,7 @@ if __name__ == '__main__':
except IOError:
# Check for multiple view files inside a view directory
try:
module_path = os.path.join(module_path, 'views')
module_path = os.path.join(app_path, 'views')
for module_name in os.listdir(module_path):
if not module_name.startswith('__init__.py') and not module_name.endswith('.pyc'):
module_filename = os.path.join(module_path, module_name)
@@ -85,7 +82,6 @@ if __name__ == '__main__':
# No API views directory, skip app
print ' No API views'
print '\n Tests'
module_path = os.path.join(app_path, 'tests')
try:
@@ -100,7 +96,6 @@ if __name__ == '__main__':
# No tests directory, skip app
print ' No tests'
print '-' * 10
print 'Totals:'