Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f9f6e096
Commit
f9f6e096
authored
May 23, 2014
by
Christine Lytwynec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for pylint/pep8 defaults
parent
550d0543
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
28 deletions
+30
-28
pavelib/quality.py
+30
-28
No files found.
pavelib/quality.py
View file @
f9f6e096
...
...
@@ -32,39 +32,40 @@ def run_pylint(options):
"""
Run pylint on system code
"""
system
=
getattr
(
options
,
'system'
,
'lms'
)
errors
=
getattr
(
options
,
'errors'
,
False
)
systems
=
getattr
(
options
,
'system'
,
'lms,cms,common'
)
.
split
(
','
)
# Directory to put the pylint report in.
# This makes the folder if it doesn't already exist.
report_dir
=
get_or_make_dir
(
os
.
path
.
join
(
Env
.
REPORT_DIR
,
system
))
for
system
in
systems
:
# Directory to put the pylint report in.
# This makes the folder if it doesn't already exist.
report_dir
=
get_or_make_dir
(
os
.
path
.
join
(
Env
.
REPORT_DIR
,
system
))
flags
=
'-E'
if
errors
else
''
flags
=
'-E'
if
errors
else
''
apps
=
[
system
]
apps
=
[
system
]
for
directory
in
[
'djangoapps'
,
'lib'
]:
dirs
=
os
.
listdir
(
os
.
path
.
join
(
system
,
directory
))
apps
.
extend
([
d
for
d
in
dirs
if
os
.
path
.
isdir
(
os
.
path
.
join
(
system
,
directory
,
d
))])
for
directory
in
[
'djangoapps'
,
'lib'
]:
dirs
=
os
.
listdir
(
os
.
path
.
join
(
system
,
directory
))
apps
.
extend
([
d
for
d
in
dirs
if
os
.
path
.
isdir
(
os
.
path
.
join
(
system
,
directory
,
d
))])
apps_list
=
' '
.
join
(
apps
)
apps_list
=
' '
.
join
(
apps
)
pythonpath_prefix
=
(
"PYTHONPATH={system}:{system}/djangoapps:{system}/"
"lib:common/djangoapps:common/lib"
.
format
(
system
=
system
pythonpath_prefix
=
(
"PYTHONPATH={system}:{system}/djangoapps:{system}/"
"lib:common/djangoapps:common/lib"
.
format
(
system
=
system
)
)
)
sh
(
"{pythonpath_prefix} pylint {flags} -f parseable {apps} | "
"tee {report_dir}/pylint.report"
.
format
(
pythonpath_prefix
=
pythonpath_prefix
,
flags
=
flags
,
apps
=
apps_list
,
report_dir
=
report_dir
sh
(
"{pythonpath_prefix} pylint {flags} -f parseable {apps} | "
"tee {report_dir}/pylint.report"
.
format
(
pythonpath_prefix
=
pythonpath_prefix
,
flags
=
flags
,
apps
=
apps_list
,
report_dir
=
report_dir
)
)
)
@task
...
...
@@ -76,13 +77,14 @@ def run_pep8(options):
"""
Run pep8 on system code
"""
system
=
getattr
(
options
,
'system'
,
'lms
'
)
system
s
=
getattr
(
options
,
'system'
,
'lms,cms,common'
)
.
split
(
',
'
)
# Directory to put the pep8 report in.
# This makes the folder if it doesn't already exist.
report_dir
=
get_or_make_dir
(
os
.
path
.
join
(
Env
.
REPORT_DIR
,
system
))
for
system
in
systems
:
# Directory to put the pep8 report in.
# This makes the folder if it doesn't already exist.
report_dir
=
get_or_make_dir
(
os
.
path
.
join
(
Env
.
REPORT_DIR
,
system
))
sh
(
'pep8 {system} | tee {report_dir}/pep8.report'
.
format
(
system
=
system
,
report_dir
=
report_dir
))
sh
(
'pep8 {system} | tee {report_dir}/pep8.report'
.
format
(
system
=
system
,
report_dir
=
report_dir
))
@task
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment