Commit Graph

38 Commits

Author SHA1 Message Date
edX requirements bot
f33f12bbea BOM-2358 : Pyupgrade in dashboard, debug, discussion apps (#26529)
* Python code cleanup by the cleanup-python-code Jenkins job.

This pull request was generated by the cleanup-python-code Jenkins job, which ran
```
cd lms/djangoapps/dashboard; find . -type f -name '*.py' | while read fname; do sed -i 's/  # lint-amnesty, pylint: disable=super-with-arguments//; s/  # lint-amnesty, pylint: disable=import-error, wrong-import-order//; s/  # lint-amnesty, pylint: disable=wrong-import-order//' "$fname"; done; find . -type f -name '*.py' | while read fname; do pyupgrade --exit-zero-even-if-changed --py3-plus --py36-plus --py38-plus "$fname"; done; isort --recursive .
```

The following packages were installed:
`pyupgrade,isort`

* feedback done

Co-authored-by: Zulqarnain <muhammad.zulqarnain@arbisoft.com>
2021-02-22 15:42:21 +05:00
M. Zulqarnain
65cf0db337 BOM-2278 : Pylint amnesty in discussion, dashboard (#26275)
* pylint amnesty in discussion, dashboard
2021-02-03 18:15:14 +05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Eric Herrera
916307df1c Update exception name due to breaking changes introduced in mongoengine 0.19.0. 2020-06-24 20:46:56 -05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Giovanni Cimolin da Silva
ba4de2f933 Upgrade pymongo and fix issues
This commit upgrades the version of pymongo from 2.x to 3.x, removing usages to deprecated functions usage and fixing tests where necessary.

This version of pymongo supports MongoDB 2.x all the way up to 4.2, and this ensures that the platform will be able to run on a supported MongoDB version in the next release.
2019-12-09 15:43:56 -03:00
Awais Qureshi
a0e4e94e31 BOM-482
Fixing python3
2019-09-20 20:18:18 +05:00
aarif
2e7349b04e python 3 fixes
removed pdb statement

quality fixes

quality fixes

test fixes

quality fixes

python 3 fixes

removed pdb statement

quality fixes

quality fixes

test fixes

quality fixes
2019-09-04 16:02:29 +05:00
aarif
61800c619f replaced StringIO imports with import from six
replaced cStringIO and StringIO imports with import from six

fixed StringIO imports

fixed StringIO imports

fixed XSS python-wrap warning
2019-08-08 00:09:16 +05:00
Feanil Patel
9ebcf758df Use our fork of this repo instead of the mitocw one. 2019-05-30 13:43:04 -04:00
Stu Young
c7f6ff14da incr-277 (#20582)
* run python modernize

* run isort

* remove escape import
2019-05-16 13:21:51 -04:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Amir Qayyum Khan
9124933925 Fixed issue where git logs aren't functioning
Use the course key as the primary key for storing coure import logs in
mongo, instead of the deprecated course key (this only applies to
courses imported via git_import.py).

No effort is made to migrate existing logs, since they are ephemeral.
2018-10-02 21:01:20 +05:00
noraiz-anwar
593c2d1ae8 add python getter in capa system 2018-07-18 18:44:56 +05:00
Jeremy Bowman
5289c7e828 PLAT-1915 Stop using deprecated BaseException.message 2018-01-31 17:22:01 -05:00
Gavin Sidebottom
ec0263bc5b changed 'course code lib' references to 'python lib' to maintain consistency 2018-01-25 16:08:57 -05:00
Gavin Sidebottom
8476f19463 Enabled python code lib import with GIT_IMPORT_STATIC set to False 2018-01-25 16:08:25 -05:00
cahrens
819a56fee3 Remove usages of deprecated SlashSeparatedCourseKey. 2017-08-14 11:01:00 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Calen Pennington
cb2ac42426 Use separate git repos for separate TestCases 2016-05-16 13:29:16 -04:00
Sarina Canelake
39d3537410 Pylint logging-format-interpolation: Convert logging calls to use %s formatting 2015-07-13 17:33:29 -04:00
Jonathan Piacenti
8ad4d081fb Added library import and export via .tar.gz'd XML files. 2015-03-10 21:29:29 +00:00
David Baumgold
36e77c7463 Fixing pep8 issues 2014-12-11 13:04:49 -05:00
Sarina Canelake
90624ac4ba s/pylint: disable=R0915/pylint: disable=too-many-statements/ 2014-12-01 11:22:11 -05:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Jason Bau
b55362b925 make unit tests respect mongo port/host settings (with default)
settings are read in from environment variable
2014-08-11 14:17:29 -07:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04:00
Sarina Canelake
b3462d1c67 Fix issues with psychometrics and git import 2014-05-16 11:47:14 -04:00
Calen Pennington
19acdd31e8 Merge remote-tracking branch 'edx/master' into opaque-keys-merge-master
Conflicts:
	cms/djangoapps/contentstore/views/public.py
	common/djangoapps/external_auth/tests/test_ssl.py
	common/djangoapps/student/views.py
	lms/djangoapps/dashboard/sysadmin.py
	lms/templates/notes.html
2014-05-12 11:35:03 -04:00
Calen Pennington
cd746bf8e5 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds the non-courseware lms/djangoapps and lms/lib.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-08 12:09:23 -04:00
Carson Gee
e311dfa847 Adding additonal path to search for git information on sysadmin dashboard
When viewing the sysadmin dashboard courses tag, we also search the git
repository directory in addition to the DATA_DIR to try and find
the course git repo to get hash, last commit, and last editor information
for each loaded course if available.
2014-05-05 12:03:18 -04:00
Carson Gee
b67b89e562 Fixed bug of checking out the same branch multiple times and code review fixes
Translator comments and language fixes
2014-03-06 17:30:07 -05:00
Carson Gee
9d55c88c76 Add option for importing a course from a named branch of a git repo 2014-03-06 16:26:25 -05:00
Don Mitchell
81a92e4bfc Consolidate course_id triple parsing 2014-02-24 11:45:59 -05:00
Carson Gee
7d86124586 Add additional logging for importing course from git 2014-01-22 14:22:06 -05:00
Carson Gee
ab151f9e7b Several code enhancements to sysadmin dashboard
Improved testing (cleaning up afterwards, catching stdout)
Refactored import function to it's own file
Removed monkey patch to log capturing, but still needs work
Translation fixes
Removal of several gettext phrases
2014-01-10 09:31:53 -05:00