diff --git a/evennia/commands/command.py b/evennia/commands/command.py index e2fff2f857..dd317dcd6d 100644 --- a/evennia/commands/command.py +++ b/evennia/commands/command.py @@ -507,7 +507,8 @@ Command {self} has no defined `func()` - showing on-command variables: """ if self.session: return self.session.protocol_flags.get( - "SCREENWIDTH", {0: settings.CLIENT_DEFAULT_WIDTH})[0] + "SCREENWIDTH", {0: settings.CLIENT_DEFAULT_WIDTH} + )[0] return settings.CLIENT_DEFAULT_WIDTH def styled_table(self, *args, **kwargs): diff --git a/evennia/web/utils/middleware.py b/evennia/web/utils/middleware.py index aace1263f7..ee1286b705 100644 --- a/evennia/web/utils/middleware.py +++ b/evennia/web/utils/middleware.py @@ -64,7 +64,9 @@ class SharedLoginMiddleware(object): if csession.get("webclient_authenticated_uid", None): # set a nonce to prevent the webclient from erasing the webclient_authenticated_uid value - csession["webclient_authenticated_nonce"] = csession.get("webclient_authenticated_nonce", 0) + 1 + csession["webclient_authenticated_nonce"] = ( + csession.get("webclient_authenticated_nonce", 0) + 1 + ) # wrap around to prevent integer overflows if csession["webclient_authenticated_nonce"] > 32: csession["webclient_authenticated_nonce"] = 0