mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add exclude for E1101: Module 'nh3' has no 'clean' member
--False Positive-- Issue tracking (fix planned for pylint 4.0.0) https://github.com/messense/nh3/issues/18 https://github.com/pylint-dev/pylint/issues/8756
This commit is contained in:
parent
75f918fe13
commit
ef691eda5c
@ -106,7 +106,7 @@ class BaseHandler(tornado.web.RequestHandler):
|
||||
if type(text) in self.nobleach:
|
||||
logger.debug("Auto-bleaching - bypass type")
|
||||
return text
|
||||
return nh3.clean(text)
|
||||
return nh3.clean(text) # pylint: disable=no-member
|
||||
|
||||
def get_argument(
|
||||
self,
|
||||
|
@ -80,7 +80,9 @@ class PanelHandler(BaseHandler):
|
||||
) in self.controller.crafty_perms.list_defined_crafty_permissions():
|
||||
argument = int(
|
||||
float(
|
||||
nh3.clean(self.get_argument(f"permission_{permission.name}", "0"))
|
||||
nh3.clean(
|
||||
self.get_argument(f"permission_{permission.name}", "0")
|
||||
) # pylint: disable=no-member
|
||||
)
|
||||
)
|
||||
if argument:
|
||||
@ -89,7 +91,9 @@ class PanelHandler(BaseHandler):
|
||||
)
|
||||
|
||||
q_argument = int(
|
||||
float(nh3.clean(self.get_argument(f"quantity_{permission.name}", "0")))
|
||||
float(
|
||||
nh3.clean(self.get_argument(f"quantity_{permission.name}", "0"))
|
||||
) # pylint: disable=no-member
|
||||
)
|
||||
if q_argument:
|
||||
server_quantity[permission.name] = q_argument
|
||||
@ -503,7 +507,9 @@ class PanelHandler(BaseHandler):
|
||||
template = "panel/dashboard.html"
|
||||
|
||||
elif page == "server_detail":
|
||||
subpage = nh3.clean(self.get_argument("subpage", ""))
|
||||
subpage = nh3.clean(
|
||||
self.get_argument("subpage", "")
|
||||
) # pylint: disable=no-member
|
||||
|
||||
server_id = self.check_server_id()
|
||||
# load page the user was on last
|
||||
@ -1362,7 +1368,9 @@ class PanelHandler(BaseHandler):
|
||||
template = "panel/panel_edit_user_apikeys.html"
|
||||
|
||||
elif page == "remove_user":
|
||||
user_id = nh3.clean(self.get_argument("id", None))
|
||||
user_id = nh3.clean(
|
||||
self.get_argument("id", None)
|
||||
) # pylint: disable=no-member
|
||||
|
||||
if (
|
||||
not superuser
|
||||
|
@ -29,8 +29,12 @@ class PublicHandler(BaseHandler):
|
||||
# self.clear_cookie("user_data")
|
||||
|
||||
def get(self, page=None):
|
||||
error = nh3.clean(self.get_argument("error", "Invalid Login!"))
|
||||
error_msg = nh3.clean(self.get_argument("error_msg", ""))
|
||||
error = nh3.clean(
|
||||
self.get_argument("error", "Invalid Login!")
|
||||
) # pylint: disable=no-member
|
||||
error_msg = nh3.clean(
|
||||
self.get_argument("error_msg", "")
|
||||
) # pylint: disable=no-member
|
||||
|
||||
page_data = {
|
||||
"version": self.helper.get_version_string(),
|
||||
@ -87,8 +91,12 @@ class PublicHandler(BaseHandler):
|
||||
)
|
||||
|
||||
def post(self, page=None):
|
||||
error = nh3.clean(self.get_argument("error", "Invalid Login!"))
|
||||
error_msg = nh3.clean(self.get_argument("error_msg", ""))
|
||||
error = nh3.clean(
|
||||
self.get_argument("error", "Invalid Login!")
|
||||
) # pylint: disable=no-member
|
||||
error_msg = nh3.clean(
|
||||
self.get_argument("error_msg", "")
|
||||
) # pylint: disable=no-member
|
||||
|
||||
page_data = {
|
||||
"version": self.helper.get_version_string(),
|
||||
@ -108,10 +116,11 @@ class PublicHandler(BaseHandler):
|
||||
if self.request.query:
|
||||
next_page = "/login?" + self.request.query
|
||||
|
||||
entered_username = nh3.clean(self.get_argument("username"))
|
||||
entered_username = nh3.clean(
|
||||
self.get_argument("username")
|
||||
) # pylint: disable=no-member
|
||||
entered_password = self.get_argument("password")
|
||||
|
||||
# pylint: disable=no-member
|
||||
try:
|
||||
user_id = HelperUsers.get_user_id_by_name(entered_username.lower())
|
||||
user_data = HelperUsers.get_user_model(user_id)
|
||||
|
Loading…
Reference in New Issue
Block a user