BOM-2477: pylint warnings lint-amnesty (#27585)
This commit is contained in:
@@ -6,7 +6,7 @@ from logging import getLogger
|
||||
|
||||
from lms.djangoapps.courseware.access import has_access
|
||||
from lms.djangoapps.courseware.masquerade import MASQUERADE_SETTINGS_KEY
|
||||
from common.djangoapps.student.roles import GlobalStaff
|
||||
from common.djangoapps.student.roles import GlobalStaff # lint-amnesty, pylint: disable=unused-import
|
||||
from .exceptions import ItemNotFoundError, NoPathToItem
|
||||
|
||||
LOGGER = getLogger(__name__)
|
||||
|
||||
@@ -324,7 +324,7 @@ class ItemFactory(XModuleFactory):
|
||||
return parent.location
|
||||
|
||||
@classmethod
|
||||
def _create(cls, target_class, **kwargs): # lint-amnesty, pylint: disable=arguments-differ, unused-argument
|
||||
def _create(cls, target_class, **kwargs): # lint-amnesty, pylint: disable=arguments-differ, too-many-statements, unused-argument
|
||||
"""
|
||||
Uses ``**kwargs``:
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ class Progress: # pylint: disable=eq-without-hash
|
||||
isinstance(b, numbers.Number)):
|
||||
raise TypeError(f'a and b must be numbers. Passed {a}/{b}')
|
||||
|
||||
if a > b:
|
||||
if a > b: # lint-amnesty, pylint: disable=consider-using-min-builtin
|
||||
a = b
|
||||
|
||||
if a < 0:
|
||||
if a < 0: # lint-amnesty, pylint: disable=consider-using-max-builtin
|
||||
a = 0
|
||||
|
||||
if b <= 0:
|
||||
|
||||
Reference in New Issue
Block a user