Commit Graph

14 Commits

Author SHA1 Message Date
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
Awais Qureshi
922c25f154 BOM-2374
Run Pyupgrade on entitlement.
2021-02-23 16:08:26 +05:00
Aarif
7dfd6edd23 replaced unittest assertions pytest assertions (#26524) 2021-02-18 18:08:23 +05:00
usamasadiq
e1ed3211c1 Applied pylint-amnesty to common/djangoapps/entitlements 2021-02-04 15:33:25 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
SaadYousaf
0a3faf08a0 add mgmt command to update entitlement mode. 2020-09-08 18:22:47 +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
Ayub khan
d1b5c51be2 BOM-629
python3 compatibility
2019-09-19 17:03:22 +05:00
uzairr
80316c632d Update Help msgs of management commands
PROD-399
2019-08-02 15:20:26 +05:00
Anthony Wee
2d8dfa895f INCR-129: Run python-modernize on common/djangoapps/entitlements/management and tests (#20446)
* INCR-129: Run python-modernize on common/djangoapps/entitlements/management

* isort

* INCR-129: Run python-modernize on common/djangoapps/entitlements/tests

* isort
2019-05-07 12:52:09 -04:00
Michael Terry
b7fbfc938d Fix expire_old_entitlements celery task
Celery was not able to find the task implementation, because we were
putting it in a nonstandard place.
2018-01-05 14:34:10 -05:00
Michael Terry
64b7fb88b8 Pass serializable data to celery
The expire_old_entitlements management command was passing a
Paginator object to celery, which it can't serialize when it is
running async. Instead, we'll do the pagination manually inside the
task code and simply pass it integers.
2018-01-04 12:01:41 -05:00
Michael Terry
4b25ffa39d Add expire_old_entitlements command
This new management command will search for possible entitlements
that are languishing in the database and expire them if they can
be according to our policy.

This is meant to be run on a regular basis to clear out old
entitlements.

LEARNER-3087
2017-12-13 11:11:55 -05:00