Commit Graph

16 Commits

Author SHA1 Message Date
Kyle McCormick
680bd32de8 revert: refactor: pyupgrade second iteration (#27591)
The edx-sandbox (secure/codejailed execution context
for edx-platform) still runs in Python 3.5, so certain
modules in common/lib cannot be py-upgraded to use
Python 3.8 syntax.

Specifically, this commit added an f-string to
common/lib/sandbox-packages/verifiers/draganddrop.py,
which broke scoring of deprecated drag-and-drop problems
in codejail.

TNL-8322

This reverts commit 8c06b68bbe
2021-05-11 10:53:49 -04:00
Usama Sadiq
8c06b68bbe refactor: pyupgrade second iteration (#27451) 2021-05-10 13:46:28 +05:00
Kyle McCormick
5557194af1 revert: BOM-2378 (B) : pyupgrade in common/lib (#26943)
Reverts #26731

The code in common/lib/capa/capa/safe_exec needs
to remain Python 3.5-compatible, since edx-sandbox
(ie codejail) is still running Python 3.5.
2021-03-10 15:01:09 -05:00
M. Zulqarnain
8e8420dd46 BOM-2378 (B) : pyupgrade in common/lib (#26731)
* refactor: pyupgrade on common/lib

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-03-10 17:56:24 +05:00
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
usamasadiq
bbc386752f Applied pylint-amnesty 2021-02-04 18:52:10 +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
Amit
0491b3a14f INCR-170: Run python-modernize on common/lib [safe_lxml, sandbox-packages] (#20508) 2019-05-10 09:00:44 -04:00
Ned Batchelder
3d49d80b58 Fix safe_lxml. SEC-338
The imports were sorted in May, which broke the monkeypatching in
safe_lxml.  I added two tests that the XML parsers are properly patched,
but they didn't pass until I added the monkeypatching to the start of
the test runs.  Once that was done, some tests failed because they
relied on specific details of how empty elements are represented.  Those
tests are now fixed.
2017-12-12 16:13:47 -05:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
Sarina Canelake
ba8fd1c21d Eliminate instances of unused-import Pylint violation 2015-07-13 17:33:25 -04:00
Braden MacDonald
caca3e1bdf SAML2 third_party_auth provider(s) - PR 8018 2015-06-26 13:23:59 -07:00
Calen Pennington
1f17538d42 Clean up tests in preparation for switching Vertical from an XModule to an XBlock 2015-03-30 16:37:53 -04:00
Usman Khalid
fc895fe8bf Moved imports to startup.py. 2014-09-11 20:14:37 +05:00