Project 'rc/self-reg-form' was moved to 'rc/account-app'. Please update any links and bookmarks that may still have the old path.
Add linting tools configuration
Add config for black: enable preview feature mainly for long string reformat
Add config for flake8: count for violations exclude some path
Add config for pylint: ignore some messages
Merge request reports
Activity
Filter activity
mentioned in merge request !28 (merged)
mentioned in merge request !15 (merged)
Output from pylint:
************* Module app app/__init__.py:9:0: C0301: Line too long (105/100) (line-too-long) app/__init__.py:29:0: C0301: Line too long (106/100) (line-too-long) app/__init__.py:40:36: C0303: Trailing whitespace (trailing-whitespace) app/__init__.py:50:0: C0325: Unnecessary parens after 'if' keyword (superfluous-parens) app/__init__.py:51:0: C0301: Line too long (115/100) (line-too-long) app/__init__.py:54:0: C0301: Line too long (110/100) (line-too-long) app/__init__.py:57:0: W0311: Bad indentation. Found 14 spaces, expected 12 (bad-indentation) app/__init__.py:59:0: C0301: Line too long (108/100) (line-too-long) app/__init__.py:61:0: C0301: Line too long (120/100) (line-too-long) app/__init__.py:65:0: C0301: Line too long (108/100) (line-too-long) app/__init__.py:29:48: W1401: Anomalous backslash in string: '\.'. String constant might be missing an r prefix. (anomalous-backslash-in-string) app/__init__.py:5:0: W0622: Redefining built-in 'vars' (redefined-builtin) app/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring) app/__init__.py:9:0: E0401: Unable to import 'flask' (import-error) app/__init__.py:10:0: E0401: Unable to import 'flask_cors' (import-error) app/__init__.py:11:0: E0401: Unable to import 'flask_bootstrap' (import-error) app/__init__.py:19:0: E0401: Unable to import 'rc_util' (import-error) app/__init__.py:19:0: C0413: Import "import rc_util" should be placed at the top of the module (wrong-import-position) app/__init__.py:21:0: C0116: Missing function or method docstring (missing-function-docstring) app/__init__.py:40:21: E1101: Module 'vars' has no 'valid_eppa' member (no-member) app/__init__.py:53:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return) app/__init__.py:73:18: W0613: Unused argument 'error' (unused-argument) app/__init__.py:77:23: W0613: Unused argument 'error' (unused-argument) app/__init__.py:81:30: W0613: Unused argument 'error' (unused-argument) app/__init__.py:21:15: W0613: Unused argument 'config_name' (unused-argument) app/__init__.py:23:4: W0612: Unused variable 'cors' (unused-variable) app/__init__.py:8:0: C0411: standard import "import uuid" should be placed before "import vars" (wrong-import-order) app/__init__.py:9:0: C0411: third party import "from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory" should be placed before "import vars" (wrong-import-order) app/__init__.py:10:0: C0411: third party import "from flask_cors import CORS" should be placed before "import vars" (wrong-import-order) app/__init__.py:11:0: C0411: third party import "from flask_bootstrap import Bootstrap" should be placed before "import vars" (wrong-import-order) app/__init__.py:12:0: C0411: standard import "import random" should be placed before "from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory" (wrong-import-order) app/__init__.py:13:0: C0411: standard import "import os" should be placed before "from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory" (wrong-import-order) app/__init__.py:14:0: C0411: standard import "import json" should be placed before "from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory" (wrong-import-order) app/__init__.py:15:0: C0411: standard import "import sys" should be placed before "from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory" (wrong-import-order) app/__init__.py:16:0: C0411: standard import "import re" should be placed before "from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory" (wrong-import-order) app/__init__.py:19:0: C0411: third party import "import rc_util" should be placed before "import vars" (wrong-import-order) ************* Module config config.py:1:0: C0114: Missing module docstring (missing-module-docstring) config.py:4:0: R0205: Class 'Config' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance) config.py:4:0: R0903: Too few public methods (0/2) (too-few-public-methods) config.py:12:0: R0903: Too few public methods (0/2) (too-few-public-methods) config.py:20:0: R0903: Too few public methods (0/2) (too-few-public-methods) config.py:28:0: R0903: Too few public methods (0/2) (too-few-public-methods) ************* Module messages messages.py:1:0: C0301: Line too long (278/100) (line-too-long) messages.py:2:0: C0301: Line too long (157/100) (line-too-long) messages.py:3:0: C0301: Line too long (238/100) (line-too-long) messages.py:4:0: C0301: Line too long (295/100) (line-too-long) messages.py:5:0: C0301: Line too long (372/100) (line-too-long) messages.py:1:0: C0114: Missing module docstring (missing-module-docstring) messages.py:1:0: C0103: Constant name "welcome_message" doesn't conform to UPPER_CASE naming style (invalid-name) messages.py:2:0: W1404: Implicit string concatenation found in assignment (implicit-str-concat) messages.py:2:0: C0103: Constant name "cancel_message" doesn't conform to UPPER_CASE naming style (invalid-name) messages.py:3:0: C0103: Constant name "error_message" doesn't conform to UPPER_CASE naming style (invalid-name) messages.py:4:0: C0103: Constant name "certification_message" doesn't conform to UPPER_CASE naming style (invalid-name) messages.py:5:0: W1404: Implicit string concatenation found in assignment (implicit-str-concat) messages.py:5:0: C0103: Constant name "unauthorized_message" doesn't conform to UPPER_CASE naming style (invalid-name) ************* Module run run.py:17:0: C0301: Line too long (106/100) (line-too-long) run.py:6:0: W0622: Redefining built-in 'vars' (redefined-builtin) run.py:1:0: C0114: Missing module docstring (missing-module-docstring) run.py:8:0: E0401: Unable to import 'flask' (import-error) run.py:9:0: E0401: Unable to import 'flask_socketio' (import-error) run.py:11:0: E0401: Unable to import 'gevent' (import-error) run.py:20:0: C0116: Missing function or method docstring (missing-function-docstring) run.py:28:0: W0102: Dangerous default value [] as argument (dangerous-default-value) run.py:28:0: C0116: Missing function or method docstring (missing-function-docstring) run.py:31:10: C0209: Formatting a regular string which could be a f-string (consider-using-f-string) run.py:34:11: W0703: Catching too general exception Exception (broad-except) run.py:34:4: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name) run.py:28:26: W0613: Unused argument 'methods' (unused-argument) run.py:39:0: W0102: Dangerous default value [] as argument (dangerous-default-value) run.py:39:0: C0116: Missing function or method docstring (missing-function-docstring) run.py:42:10: C0209: Formatting a regular string which could be a f-string (consider-using-f-string) run.py:45:11: W0703: Catching too general exception Exception (broad-except) run.py:45:4: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name) run.py:39:26: W0613: Unused argument 'methods' (unused-argument) run.py:8:0: C0411: third party import "from flask import session" should be placed before "import tasks" (wrong-import-order) run.py:9:0: C0411: third party import "from flask_socketio import SocketIO, join_room" should be placed before "import tasks" (wrong-import-order) run.py:11:0: C0411: third party import "from gevent import monkey" should be placed before "import tasks" (wrong-import-order) ************* Module tasks tasks.py:71:30: C0303: Trailing whitespace (trailing-whitespace) tasks.py:94:0: C0301: Line too long (101/100) (line-too-long) tasks.py:1:0: W0622: Redefining built-in 'vars' (redefined-builtin) tasks.py:1:0: C0114: Missing module docstring (missing-module-docstring) tasks.py:7:0: E0401: Unable to import 'celery' (import-error) tasks.py:8:0: E0401: Unable to import 'flask_socketio' (import-error) tasks.py:11:0: E0401: Unable to import 'rc_util' (import-error) tasks.py:11:0: C0413: Import "import rc_util" should be placed at the top of the module (wrong-import-position) tasks.py:13:13: E1101: Module 'vars' has no 'broker_url' member (no-member) tasks.py:14:16: E1101: Module 'vars' has no 'celery_app' member (no-member) tasks.py:17:0: C0103: Constant name "timeout" doesn't conform to UPPER_CASE naming style (invalid-name) tasks.py:19:0: C0116: Missing function or method docstring (missing-function-docstring) tasks.py:20:17: W0613: Unused argument 'channel' (unused-argument) tasks.py:20:26: W0613: Unused argument 'method' (unused-argument) tasks.py:20:34: W0613: Unused argument 'properties' (unused-argument) tasks.py:39:0: C0116: Missing function or method docstring (missing-function-docstring) tasks.py:40:17: W0613: Unused argument 'channel' (unused-argument) tasks.py:40:26: W0613: Unused argument 'method' (unused-argument) tasks.py:40:34: W0613: Unused argument 'properties' (unused-argument) tasks.py:59:0: C0116: Missing function or method docstring (missing-function-docstring) tasks.py:62:0: C0116: Missing function or method docstring (missing-function-docstring) tasks.py:64:35: E0602: Undefined variable 'errmsg' (undefined-variable) tasks.py:64:49: E0602: Undefined variable 'room' (undefined-variable) tasks.py:62:20: W0613: Unused argument 'signum' (unused-argument) tasks.py:62:28: W0613: Unused argument 'frame' (unused-argument) tasks.py:69:26: W0621: Redefining name 'json' from outer scope (line 3) (redefined-outer-name) tasks.py:69:0: C0116: Missing function or method docstring (missing-function-docstring) tasks.py:87:27: W0621: Redefining name 'json' from outer scope (line 3) (redefined-outer-name) tasks.py:87:0: C0116: Missing function or method docstring (missing-function-docstring) tasks.py:90:4: W0612: Unused variable 'email' (unused-variable) tasks.py:91:4: W0612: Unused variable 'fullname' (unused-variable) tasks.py:5:0: W0611: Unused import signal (unused-import) tasks.py:2:0: C0411: standard import "import sys" should be placed before "import vars" (wrong-import-order) tasks.py:3:0: C0411: standard import "import json" should be placed before "import vars" (wrong-import-order) tasks.py:4:0: C0411: standard import "import time" should be placed before "import vars" (wrong-import-order) tasks.py:5:0: C0411: standard import "import signal" should be placed before "import vars" (wrong-import-order) tasks.py:7:0: C0411: third party import "from celery import Celery" should be placed before "import vars" (wrong-import-order) tasks.py:8:0: C0411: third party import "from flask_socketio import SocketIO" should be placed before "import vars" (wrong-import-order) tasks.py:11:0: C0411: third party import "import rc_util" should be placed before "import vars" (wrong-import-order) ************* Module tests tests.py:32:5: W0511: TODO: make tests (fixme) tests.py:37:5: W0511: TODO: make tests (fixme) tests.py:1:0: C0114: Missing module docstring (missing-module-docstring) tests.py:5:0: E0401: Unable to import 'flask' (import-error) tests.py:6:0: E0401: Unable to import 'flask' (import-error) tests.py:7:0: E0401: Unable to import 'flask_testing' (import-error) tests.py:12:0: C0115: Missing class docstring (missing-class-docstring) tests.py:14:4: C0116: Missing function or method docstring (missing-function-docstring) tests.py:14:4: R0201: Method could be a function (no-self-use) tests.py:18:4: C0103: Method name "setUp" doesn't conform to snake_case naming style (invalid-name) tests.py:18:4: R0201: Method could be a function (no-self-use) tests.py:25:4: C0103: Method name "tearDown" doesn't conform to snake_case naming style (invalid-name) tests.py:31:0: C0115: Missing class docstring (missing-class-docstring) tests.py:36:0: C0115: Missing class docstring (missing-class-docstring) tests.py:57:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) tests.py:72:0: C0115: Missing class docstring (missing-class-docstring) tests.py:74:4: C0116: Missing function or method docstring (missing-function-docstring) tests.py:84:4: C0116: Missing function or method docstring (missing-function-docstring) tests.py:89:4: C0116: Missing function or method docstring (missing-function-docstring) tests.py:6:0: W0611: Unused g imported from flask (unused-import) ************* Module vars vars.py:1:0: W0622: Redefining built-in 'id' (redefined-builtin) vars.py:1:0: C0114: Missing module docstring (missing-module-docstring) vars.py:1:0: C0103: Constant name "id" doesn't conform to UPPER_CASE naming style (invalid-name) vars.py:2:0: C0103: Constant name "password" doesn't conform to UPPER_CASE naming style (invalid-name) vars.py:3:0: C0103: Constant name "key" doesn't conform to UPPER_CASE naming style (invalid-name) vars.py:5:17: E0602: Undefined variable 'broker_url' (undefined-variable) vars.py:6:0: C0103: Constant name "default_referrer" doesn't conform to UPPER_CASE naming style (invalid-name) vars.py:7:0: C0103: Constant name "cors_allowed_origins" doesn't conform to UPPER_CASE naming style (invalid-name) vars.py:8:0: C0103: Constant name "rabbitmq_agents_loc" doesn't conform to UPPER_CASE naming style (invalid-name) Report ====== 228 statements analysed. Statistics by type ------------------ +---------+-------+-----------+-----------+------------+---------+ |type |number |old number |difference |%documented |%badname | +=========+=======+===========+===========+============+=========+ |module |7 |NC |NC |0.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |class |8 |NC |NC |50.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |method |8 |NC |NC |50.00 |25.00 | +---------+-------+-----------+-----------+------------+---------+ |function |19 |NC |NC |47.37 |0.00 | +---------+-------+-----------+-----------+------------+---------+ External dependencies --------------------- :: app (run,tests) messages (app) tasks (run) vars (app,run,tasks) Raw metrics ----------- +----------+-------+------+---------+-----------+ |type |number |% |previous |difference | +==========+=======+======+=========+===========+ |code |265 |65.27 |NC |NC | +----------+-------+------+---------+-----------+ |docstring |31 |7.64 |NC |NC | +----------+-------+------+---------+-----------+ |comment |25 |6.16 |NC |NC | +----------+-------+------+---------+-----------+ |empty |85 |20.94 |NC |NC | +----------+-------+------+---------+-----------+ Duplication ----------- +-------------------------+------+---------+-----------+ | |now |previous |difference | +=========================+======+=========+===========+ |nb duplicated lines |0 |0 |0 | +-------------------------+------+---------+-----------+ |percent duplicated lines |0.000 |0.000 |= | +-------------------------+------+---------+-----------+ Messages by category -------------------- +-----------+-------+---------+-----------+ |type |number |previous |difference | +===========+=======+=========+===========+ |convention |83 |0 |0 | +-----------+-------+---------+-----------+ |refactor |8 |0 |0 | +-----------+-------+---------+-----------+ |warning |35 |2 |2 | +-----------+-------+---------+-----------+ |error |19 |0 |0 | +-----------+-------+---------+-----------+ Messages -------- +------------------------------+------------+ |message id |occurrences | +==============================+============+ |wrong-import-order |20 | +------------------------------+------------+ |invalid-name |17 | +------------------------------+------------+ |unused-argument |14 | +------------------------------+------------+ |missing-function-docstring |14 | +------------------------------+------------+ |line-too-long |14 | +------------------------------+------------+ |import-error |13 | +------------------------------+------------+ |missing-module-docstring |7 | +------------------------------+------------+ |too-few-public-methods |4 | +------------------------------+------------+ |redefined-builtin |4 | +------------------------------+------------+ |missing-class-docstring |4 | +------------------------------+------------+ |unused-variable |3 | +------------------------------+------------+ |undefined-variable |3 | +------------------------------+------------+ |no-member |3 | +------------------------------+------------+ |wrong-import-position |2 | +------------------------------+------------+ |unused-import |2 | +------------------------------+------------+ |trailing-whitespace |2 | +------------------------------+------------+ |redefined-outer-name |2 | +------------------------------+------------+ |no-self-use |2 | +------------------------------+------------+ |implicit-str-concat |2 | +------------------------------+------------+ |fixme |2 | +------------------------------+------------+ |dangerous-default-value |2 | +------------------------------+------------+ |consider-using-f-string |2 | +------------------------------+------------+ |broad-except |2 | +------------------------------+------------+ |useless-object-inheritance |1 | +------------------------------+------------+ |superfluous-parens |1 | +------------------------------+------------+ |no-else-return |1 | +------------------------------+------------+ |bad-indentation |1 | +------------------------------+------------+ |anomalous-backslash-in-string |1 | +------------------------------+------------+ ------------------------------------------------------------------ Your code has been rated at 0.31/10 (previous run: 9.89/10, -9.59)
Edited by Bo-Chun ChenThose we disabled:
import-error
************* Module app app/__init__.py:9:0: E0401: Unable to import 'flask' (import-error) app/__init__.py:10:0: E0401: Unable to import 'flask_cors' (import-error) app/__init__.py:11:0: E0401: Unable to import 'flask_bootstrap' (import-error) app/__init__.py:19:0: E0401: Unable to import 'rc_util' (import-error) ************* Module run run.py:8:0: E0401: Unable to import 'flask' (import-error) run.py:9:0: E0401: Unable to import 'flask_socketio' (import-error) run.py:11:0: E0401: Unable to import 'gevent' (import-error) ************* Module tasks tasks.py:7:0: E0401: Unable to import 'celery' (import-error) tasks.py:8:0: E0401: Unable to import 'flask_socketio' (import-error) tasks.py:11:0: E0401: Unable to import 'rc_util' (import-error) ************* Module tests tests.py:5:0: E0401: Unable to import 'flask' (import-error) tests.py:6:0: E0401: Unable to import 'flask' (import-error) tests.py:7:0: E0401: Unable to import 'flask_testing' (import-error)
These packages are installed in a virtualenv after cloning the repo, hence pylint can't import it without venv activated.
unused-argument
************* Module app app/__init__.py:73:18: W0613: Unused argument 'error' (unused-argument) app/__init__.py:77:23: W0613: Unused argument 'error' (unused-argument) app/__init__.py:81:30: W0613: Unused argument 'error' (unused-argument) app/__init__.py:21:15: W0613: Unused argument 'config_name' (unused-argument) ************* Module run run.py:28:26: W0613: Unused argument 'methods' (unused-argument) run.py:39:26: W0613: Unused argument 'methods' (unused-argument) ************* Module tasks tasks.py:20:17: W0613: Unused argument 'channel' (unused-argument) tasks.py:20:26: W0613: Unused argument 'method' (unused-argument) tasks.py:20:34: W0613: Unused argument 'properties' (unused-argument) tasks.py:40:17: W0613: Unused argument 'channel' (unused-argument) tasks.py:40:26: W0613: Unused argument 'method' (unused-argument) tasks.py:40:34: W0613: Unused argument 'properties' (unused-argument) tasks.py:62:20: W0613: Unused argument 'signum' (unused-argument) tasks.py:62:28: W0613: Unused argument 'frame' (unused-argument)
Most of these are from rabbitmq callback functions.
broad-except
************* Module run run.py:34:11: W0703: Catching too general exception Exception (broad-except) run.py:45:11: W0703: Catching too general exception Exception (broad-except)
Edited by Bo-Chun Chenadded 1 commit
- cd091170 - Remove dangerous-default-value from disable list
Output of
flake8
:./run.py:17:80: E501 line too long (106 > 79 characters) socketio = SocketIO(app, cors_allowed_origins=vars.cors_allowed_origins, message_queue=vars.message_queue) ^ ./run.py:19:1: E302 expected 2 blank lines, found 1 @socketio.on('join_room') ^ ./run.py:27:1: E302 expected 2 blank lines, found 1 @socketio.on('request account') ^ ./run.py:29:10: E211 whitespace before '(' print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tQueue request received: ' + str(json)) ^ ./run.py:29:80: E501 line too long (89 > 79 characters) print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tQueue request received: ' + str(json)) ^ ./run.py:33:61: E202 whitespace before ')' tasks.celery_create_account.delay(json, session=room ) ^ ./run.py:35:80: E501 line too long (86 > 79 characters) print(time.strftime("%m-%d-%Y_%H:%M:%S") + "\tError in account creation: ", e) ^ ./run.py:38:1: E302 expected 2 blank lines, found 1 @socketio.on('request certification') ^ ./run.py:40:10: E211 whitespace before '(' print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tQueue request received: ' + str(json)) ^ ./run.py:40:80: E501 line too long (89 > 79 characters) print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tQueue request received: ' + str(json)) ^ ./run.py:44:56: E202 whitespace before ')' tasks.celery_certify_account(json, session=room ) ^ ./run.py:46:80: E501 line too long (91 > 79 characters) print(time.strftime("%m-%d-%Y_%H:%M:%S") + "\tError in account certification: ", e) ^ ./run.py:49:1: E305 expected 2 blank lines after class or function definition, found 1 if __name__ == '__main__': ^ ./tasks.py:5:1: F401 'signal' imported but unused import signal ^ ./tasks.py:11:1: E402 module level import not at top of file import rc_util ^ ./tasks.py:19:1: E302 expected 2 blank lines, found 1 def gen_f(room): ^ ./tasks.py:33:57: E251 unexpected spaces around keyword / parameter equals socketio.emit('account error', errmsg, room= room) ^ ./tasks.py:39:1: E302 expected 2 blank lines, found 1 def certify_gen_f(room): ^ ./tasks.py:49:80: E501 line too long (80 > 79 characters) print(f"There's some issue while certifying account for {username}") ^ ./tasks.py:53:57: E251 unexpected spaces around keyword / parameter equals socketio.emit('certify error', errmsg, room= room) ^ ./tasks.py:59:1: E302 expected 2 blank lines, found 1 def send_msg(event, room): ^ ./tasks.py:62:1: E302 expected 2 blank lines, found 1 def timeout_handler(signum, frame): ^ ./tasks.py:64:36: F821 undefined name 'errmsg' socketio.emit('account error', errmsg, room= room) ^ ./tasks.py:64:49: E251 unexpected spaces around keyword / parameter equals socketio.emit('account error', errmsg, room= room) ^ ./tasks.py:64:50: F821 undefined name 'room' socketio.emit('account error', errmsg, room= room) ^ ./tasks.py:68:1: E302 expected 2 blank lines, found 1 @celery.task ^ ./tasks.py:71:13: E225 missing whitespace around operator username= json['username'] ^ ./tasks.py:71:31: W291 trailing whitespace username= json['username'] ^ ./tasks.py:72:10: E225 missing whitespace around operator email= json['email'] ^ ./tasks.py:73:13: E225 missing whitespace around operator fullname= json['fullname'] ^ ./tasks.py:74:11: E225 missing whitespace around operator reason= json['reason'] ^ ./tasks.py:76:14: E225 missing whitespace around operator queuename= rc_util.encode_name(username) ^ ./tasks.py:78:80: E501 line too long (88 > 79 characters) print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue') ^ ./tasks.py:84:80: E501 line too long (89 > 79 characters) rc_util.consume(queuename, routing_key=f'complete.{queuename}', callback=gen_f(room)) ^ ./tasks.py:86:1: E302 expected 2 blank lines, found 1 @celery.task ^ ./tasks.py:89:13: E225 missing whitespace around operator username= json['username'] ^ ./tasks.py:90:5: F841 local variable 'email' is assigned to but never used email= json['email'] ^ ./tasks.py:90:10: E225 missing whitespace around operator email= json['email'] ^ ./tasks.py:91:5: F841 local variable 'fullname' is assigned to but never used fullname= json['fullname'] ^ ./tasks.py:91:13: E225 missing whitespace around operator fullname= json['fullname'] ^ ./tasks.py:92:14: E225 missing whitespace around operator queuename= rc_util.encode_name(username) ^ ./tasks.py:94:80: E501 line too long (101 > 79 characters) print("CERTIFY : "+time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue') ^ ./tasks.py:100:80: E501 line too long (98 > 79 characters) rc_util.consume(queuename, routing_key=f'certified.{queuename}', callback=certify_gen_f(room)) ^ ./messages.py:1:80: E501 line too long (278 > 79 characters) welcome_message = "The information below will be used to create your account. Please fill in the reason for requesting your account as this helps us understand our user base.<br>Contact <a href='mailto:support@listserv.uab.edu'>Research Computing</a> if you have any questions." ^ ./messages.py:2:80: E501 line too long (157 > 79 characters) cancel_message = "Close current tab to end session.<br>Contact <a href="'mailto:support@listserv.uab.edu'">Research Computing</a> if you have any questions." ^ ./messages.py:3:80: E501 line too long (238 > 79 characters) error_message = "An error occurred while creating your account. Research Computing team has been notified and is working on fixing it.<br>Contact <a href='mailto:support@listserv.uab.edu'>Research Computing</a> if you have any questions." ^ ./messages.py:4:80: E501 line too long (295 > 79 characters) certification_message = "Welcome back to the UAB Research Computing services page.<br>We are asking for researchers to recertify their accounts annually so that we'll know who is still actively using the systems. <br>Fill out the form below and hit the Certify Account button when you are done." ^ ./messages.py:5:80: E501 line too long (372 > 79 characters) unauthorized_message = "Your UAB Research Computing account is currently on hold.<br>Accounts are put on hold if there are changes with UAB affiliation or if there is an issue on one of the platforms.<br>Please reach out to <a href="'mailto:support@listserv.uab.edu'">Research Computing</a> or attend the weekly office hours and we'll work with you to clear your account." ^ ./tests.py:6:1: F401 'flask.g' imported but unused from flask import abort, url_for, g ^ ./app/__init__.py:9:1: F401 'flask.redirect' imported but unused from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory ^ ./app/__init__.py:9:1: F401 'flask.url_for' imported but unused from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory ^ ./app/__init__.py:9:1: F401 'flask.flash' imported but unused from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory ^ ./app/__init__.py:9:1: F401 'flask.send_from_directory' imported but unused from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory ^ ./app/__init__.py:9:80: E501 line too long (105 > 79 characters) from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory ^ ./app/__init__.py:12:1: F401 'random' imported but unused import random ^ ./app/__init__.py:13:1: F401 'os' imported but unused import os ^ ./app/__init__.py:14:1: F401 'json' imported but unused import json ^ ./app/__init__.py:19:1: E402 module level import not at top of file import rc_util ^ ./app/__init__.py:21:1: E302 expected 2 blank lines, found 1 def create_app(config_name): ^ ./app/__init__.py:22:50: E261 at least two spaces before inline comment app = Flask(__name__, static_folder='static') # initialization of the flask app ^ ./app/__init__.py:22:80: E501 line too long (83 > 79 characters) app = Flask(__name__, static_folder='static') # initialization of the flask app ^ ./app/__init__.py:23:5: F841 local variable 'cors' is assigned to but never used cors = CORS(app, resources={r"/*": {"origins": vars.cors_allowed_origins}}) ^ ./app/__init__.py:24:19: E261 at least two spaces before inline comment Bootstrap(app) # allowing app to use bootstrap ^ ./app/__init__.py:29:49: W605 invalid escape sequence '\.' "username": re.search("([^!]+?)(@uab\.edu)?$", request.headers.get("Persistent-Id")).group(1), ^ ./app/__init__.py:29:80: E501 line too long (106 > 79 characters) "username": re.search("([^!]+?)(@uab\.edu)?$", request.headers.get("Persistent-Id")).group(1), ^ ./app/__init__.py:30:80: E501 line too long (90 > 79 characters) "fullname": f'{request.headers.get("Givenname")} {request.headers.get("Sn")}', ^ ./app/__init__.py:37:45: E261 at least two spaces before inline comment @app.route('/', methods=['GET', 'POST']) # initial route to display the reg page ^ ./app/__init__.py:37:80: E501 line too long (84 > 79 characters) @app.route('/', methods=['GET', 'POST']) # initial route to display the reg page ^ ./app/__init__.py:40:37: W291 trailing whitespace valid_eppa = vars.valid_eppa ^ ./app/__init__.py:43:27: E225 missing whitespace around operator session['uid']=str(uuid.uuid4()) ^ ./app/__init__.py:48:80: E501 line too long (80 > 79 characters) session['return_url'] = request.args.get('redir', vars.default_referrer) ^ ./app/__init__.py:50:80: E501 line too long (81 > 79 characters) if (not any(item in session['user'].get('eppa') for item in valid_eppa)): ^ ./app/__init__.py:51:80: E501 line too long (115 > 79 characters) return render_template('account/unauthorized.html', unauthorized_message=messages.unauthorized_message) ^ ./app/__init__.py:54:80: E501 line too long (110 > 79 characters) return render_template('account/blocked.html', unauthorized_message=messages.unauthorized_message) ^ ./app/__init__.py:56:80: E501 line too long (85 > 79 characters) elif rc_util.check_state(session['user'].get('username')) == "certification": ^ ./app/__init__.py:57:15: E111 indentation is not a multiple of four return render_template('account/certify.html', room_id=session['uid'], ^ ./app/__init__.py:57:15: E117 over-indented return render_template('account/certify.html', room_id=session['uid'], ^ ./app/__init__.py:57:80: E501 line too long (84 > 79 characters) return render_template('account/certify.html', room_id=session['uid'], ^ ./app/__init__.py:58:32: E128 continuation line under-indented for visual indent username=session['user'].get('username'), ^ ./app/__init__.py:59:32: E128 continuation line under-indented for visual indent fullname=session['user'].get('fullname'), email=session['user'].get('email'), ^ ./app/__init__.py:59:80: E501 line too long (108 > 79 characters) fullname=session['user'].get('fullname'), email=session['user'].get('email'), ^ ./app/__init__.py:60:32: E128 continuation line under-indented for visual indent referrer=session['return_url'], cancel_url=vars.default_referrer, ^ ./app/__init__.py:60:80: E501 line too long (96 > 79 characters) referrer=session['return_url'], cancel_url=vars.default_referrer, ^ ./app/__init__.py:61:32: E128 continuation line under-indented for visual indent cancel_msg=messages.cancel_message, certification_message=messages.certification_message) ^ ./app/__init__.py:61:80: E501 line too long (120 > 79 characters) cancel_msg=messages.cancel_message, certification_message=messages.certification_message) ^ ./app/__init__.py:64:32: E128 continuation line under-indented for visual indent username=session['user'].get('username'), ^ ./app/__init__.py:65:32: E128 continuation line under-indented for visual indent fullname=session['user'].get('fullname'), email=session['user'].get('email'), ^ ./app/__init__.py:65:80: E501 line too long (108 > 79 characters) fullname=session['user'].get('fullname'), email=session['user'].get('email'), ^ ./app/__init__.py:66:32: E128 continuation line under-indented for visual indent referrer=session['return_url'], cancel_url=vars.default_referrer, ^ ./app/__init__.py:66:80: E501 line too long (96 > 79 characters) referrer=session['return_url'], cancel_url=vars.default_referrer, ^ ./app/__init__.py:67:32: E128 continuation line under-indented for visual indent welcome_msg=messages.welcome_message, ^ ./app/__init__.py:68:32: E128 continuation line under-indented for visual indent cancel_msg=messages.cancel_message, ^ ./app/__init__.py:69:32: E128 continuation line under-indented for visual indent error_msg=messages.error_message) ^ 1 E111 indentation is not a multiple of four 1 E117 over-indented 10 E128 continuation line under-indented for visual indent 2 E202 whitespace before ')' 2 E211 whitespace before '(' 10 E225 missing whitespace around operator 3 E251 unexpected spaces around keyword / parameter equals 3 E261 at least two spaces before inline comment 10 E302 expected 2 blank lines, found 1 1 E305 expected 2 blank lines after class or function definition, found 1 2 E402 module level import not at top of file 31 E501 line too long (105 > 79 characters) 9 F401 'flask.redirect' imported but unused 2 F821 undefined name 'errmsg' 3 F841 local variable 'cors' is assigned to but never used 2 W291 trailing whitespace 1 W605 invalid escape sequence '\.' 93
mentioned in commit 6c2a1fdd
Please register or sign in to reply