Skip to content

Commit

Permalink
version bump, black
Browse files Browse the repository at this point in the history
  • Loading branch information
eljeffeg committed Apr 26, 2022
1 parent 14c2e14 commit 82df13f
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 42 deletions.
34 changes: 17 additions & 17 deletions bot/BotMonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,24 +789,24 @@ def __init__(
sockopt=(),
):
"""
url: websocket url.
header: custom header for websocket handshake.
on_open: callable object which is called at opening websocket.
url: websocket url.
header: custom header for websocket handshake.
on_open: callable object which is called at opening websocket.
this function has one argument. The argument is this class object.
on_message: callbale object which is called when received data.
on_message has 2 arguments.
The 1st argument is this class object.
The passing 2nd argument is utf-8 string which we get from the server.
on_error: callable object which is called when we get error.
on_error has 2 arguments.
The 1st argument is this class object.
The passing 2nd argument is exception object.
on_close: callable object which is called when closed the connection.
this function has one argument. The argument is this class object.
on_message: callbale object which is called when received data.
on_message has 2 arguments.
The 1st argument is this class object.
The passing 2nd argument is utf-8 string which we get from the server.
on_error: callable object which is called when we get error.
on_error has 2 arguments.
The 1st argument is this class object.
The passing 2nd argument is exception object.
on_close: callable object which is called when closed the connection.
this function has one argument. The argument is this class object.
keep_running: a boolean flag indicating whether the app's main loop should
keep running, defaults to True
get_mask_key: a callable to produce new mask keys, see the WebSocket.set_mask_key's
docstring for more information
keep_running: a boolean flag indicating whether the app's main loop should
keep running, defaults to True
get_mask_key: a callable to produce new mask keys, see the WebSocket.set_mask_key's
docstring for more information
"""
self.url = url
self.header = header or []
Expand Down
34 changes: 17 additions & 17 deletions bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,24 +809,24 @@ def __init__(
sockopt=(),
):
"""
url: websocket url.
header: custom header for websocket handshake.
on_open: callable object which is called at opening websocket.
url: websocket url.
header: custom header for websocket handshake.
on_open: callable object which is called at opening websocket.
this function has one argument. The argument is this class object.
on_message: callbale object which is called when received data.
on_message has 2 arguments.
The 1st argument is this class object.
The passing 2nd argument is utf-8 string which we get from the server.
on_error: callable object which is called when we get error.
on_error has 2 arguments.
The 1st argument is this class object.
The passing 2nd argument is exception object.
on_close: callable object which is called when closed the connection.
this function has one argument. The argument is this class object.
on_message: callbale object which is called when received data.
on_message has 2 arguments.
The 1st argument is this class object.
The passing 2nd argument is utf-8 string which we get from the server.
on_error: callable object which is called when we get error.
on_error has 2 arguments.
The 1st argument is this class object.
The passing 2nd argument is exception object.
on_close: callable object which is called when closed the connection.
this function has one argument. The argument is this class object.
keep_running: a boolean flag indicating whether the app's main loop should
keep running, defaults to True
get_mask_key: a callable to produce new mask keys, see the WebSocket.set_mask_key's
docstring for more information
keep_running: a boolean flag indicating whether the app's main loop should
keep running, defaults to True
get_mask_key: a callable to produce new mask keys, see the WebSocket.set_mask_key's
docstring for more information
"""
self.url = url
self.header = header
Expand Down
6 changes: 4 additions & 2 deletions handlers/PublicHandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,8 @@ def send_validate_message(self, user):
emailtoken.value = sha256(email_token).hexdigest()
receivers = [user.email]
message = email_rfc2822_compliance(
self.create_validate_message(user, email_token))
self.create_validate_message(user, email_token)
)
smtpObj = smtplib.SMTP(options.mail_host, port=options.mail_port)
smtpObj.set_debuglevel(False)
try:
Expand Down Expand Up @@ -743,7 +744,8 @@ def post(self, *args, **kwargs):
self.dbsession.commit()
receivers = [user.email]
message = email_rfc2822_compliance(
self.create_reset_message(user, reset_token))
self.create_reset_message(user, reset_token)
)
smtpObj = smtplib.SMTP(options.mail_host, port=options.mail_port)
smtpObj.set_debuglevel(False)
try:
Expand Down
6 changes: 3 additions & 3 deletions models/Flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ def case_sensitive(self, value):
@property
def value(self):
if self._original_value and self._original_value > self._value:
""" Since value itself is no longer decreased in dynamic scoring
"""Since value itself is no longer decreased in dynamic scoring
there is no need for original_value, but for backward compatibility
if _original_value is GT the value, update the value.
At some point, we can remove original_value column. """
if _original_value is GT the value, update the value.
At some point, we can remove original_value column."""
self.value = self._original_value
return self._value

Expand Down
4 changes: 2 additions & 2 deletions rootthebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,10 +1066,10 @@ def help():
if options.version:
version()
elif options.setup.startswith("docker"):
if (not os.path.isfile(options.config) or (
if not os.path.isfile(options.config) or (
options.sql_dialect == "sqlite"
and not os.path.isfile(options.sql_database)
and not os.path.isfile("%s.db" % options.sql_database))
and not os.path.isfile("%s.db" % options.sql_database)
):
logging.info("Running Docker Setup")
if os.path.isfile(options.config):
Expand Down
2 changes: 1 addition & 1 deletion setup/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = "3.10.2"
__version__ = "3.10.3"

0 comments on commit 82df13f

Please sign in to comment.