Verified Commit 02a4afb6 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Simplify an out-of-date optimisation

Newer versions of Python seem to optimize compound conditionals with
constants better than 3.8, so splitting them is no longer needed.

>>> if __debug__:
...     if [additional conditions]:
...         ...
parent 8121b89a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -296,7 +296,6 @@ class BaseClient:
			assert client._eventcount > 0
			client._eventcount -= 1
			if client._eventcount == 0:
				if __debug__:  # On it's own for compiler optimisation
					if exc_type:
				if __debug__ and exc_type:
					client.logger.debug(f"Detaching due to {exc_type.__name__}")
				await client.send_command(consts.COMMAND_DETACH)