Repo for Web developer documentation on Oppia. For contribution instructions, see: https://github.com/oppia/oppia/wiki/Wiki#contributing-to-the-wiki
12
stars
99
forks
source link
Create Tutorial - How to read, write and modify linter checks (B) #378
Open
U8NWXD opened 3 months ago
Skills covered
Lint Checks, python, Reading/Modifying/Understanding Lint checks.
Similar issues
Existing relevant pages
Example
Write a lint check to avoid using string formatting using %s or .format().
Example:
Before - get_redirect_route( r'%s/can_access_classroom_page' % feconf.ACCESS_VALIDATION_HANDLER_PREFIX, access_validators.ClassroomAccessValidationHandler),
After - get_redirect_route( f"{feconf.ACCESS_VALIDATION_HANDLER_PREFIX}/can_access_classroom_page", access_validators.ClassroomAccessValidationHandler ),