Skip to content

Commit 6b0d7d7

Browse files
committed
Minor PEP8 fixes
1 parent 887ca06 commit 6b0d7d7

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

addons/source-python/packages/source-python/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,22 +115,22 @@
115115
if _CoreSettingsInstance['USER_SETTINGS']['private_say_commands']:
116116

117117
# Register the private user settings say commands
118-
SayCommandManager.register_commands(
119-
_CoreSettingsInstance['USER_SETTINGS']['private_say_commands'
120-
].split(','), _SettingsMenuInstance._private_command)
118+
SayCommandManager.register_commands(_CoreSettingsInstance[
119+
'USER_SETTINGS']['private_say_commands'].split(
120+
','), _SettingsMenuInstance._private_command)
121121

122122
# Are there any public user settings say commands?
123123
if _CoreSettingsInstance['USER_SETTINGS']['public_say_commands']:
124124

125125
# Register the public user settings say commands
126-
SayCommandManager.register_commands(
127-
_CoreSettingsInstance['USER_SETTINGS']['public_say_commands'
128-
].split(','), _SettingsMenuInstance._send_menu)
126+
SayCommandManager.register_commands(_CoreSettingsInstance[
127+
'USER_SETTINGS']['public_say_commands'].split(
128+
','), _SettingsMenuInstance._send_menu)
129129

130130
# Are there any client user settings commands?
131131
if _CoreSettingsInstance['USER_SETTINGS']['client_commands']:
132132

133133
# Register the client user settings commands
134-
ClientCommandManager.register_commands(
135-
_CoreSettingsInstance['USER_SETTINGS']['client_commands'
136-
].split(','), _SettingsMenuInstance._send_menu)
134+
ClientCommandManager.register_commands(_CoreSettingsInstance[
135+
'USER_SETTINGS']['client_commands'].split(
136+
','), _SettingsMenuInstance._send_menu)

addons/source-python/packages/source-python/_core/command.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def delay_execution(*args):
119119
'''Executes a command after the given delay.'''
120120

121121
# Add the delay
122-
TickDelays.delay(float(args[0]),
122+
TickDelays.delay(
123+
float(args[0]),
123124
GameEngine.server_command, ' '.join(args[1:]) + '\n')
124125

125126
@staticmethod

addons/source-python/packages/source-python/plugins/command.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ def __init__(self, command, description='', prefix=''):
4343

4444
# Does the class have a proper manager object assigned?
4545
if not (hasattr(self, 'manager') and
46-
isinstance(self.manager, PluginManager)):
46+
isinstance(self.manager, PluginManager)):
4747

4848
# If not, raise an error
4949
raise PluginManagerError(PluginManagerError.__doc__)
5050

5151
# Does the class have a proper instance class assigned?
5252
if not (hasattr(self, 'instance') and
53-
issubclass(self.instance, LoadedPlugin)):
53+
issubclass(self.instance, LoadedPlugin)):
5454

5555
# If not, raise an error
5656
raise PluginInstanceError(PluginInstanceError.__doc__)
@@ -120,7 +120,7 @@ def call_command(self, CICommand):
120120
# Print a message about the invalid sub-command
121121
message = self.prefix + _plugin_strings[
122122
'Invalid Command'].get_string(
123-
command=self.command, subcommand=command)
123+
command=self.command, subcommand=command)
124124

125125
# Was no sub-command given?
126126
else:
@@ -150,8 +150,9 @@ def call_command(self, CICommand):
150150

151151
# Print a message about the invalid number of arguments given
152152
self.logger.log_message(
153-
self.prefix + _plugin_strings['Invalid Arguments'
154-
].get_string(command=self.command, subcommand=command) +
153+
self.prefix + _plugin_strings[
154+
'Invalid Arguments'].get_string(
155+
command=self.command, subcommand=command) +
155156
' '.join(self[command].args))
156157

157158
# No need to go further
@@ -166,9 +167,10 @@ def call_command(self, CICommand):
166167
# Print a message about the invalid
167168
# number of arguments given
168169
self.logger.log_message(
169-
self.prefix + _plugin_strings['Invalid Arguments'
170-
].get_string(command=self.command, subcommand=command
171-
) + ' '.join(self[command].args))
170+
self.prefix + _plugin_strings[
171+
'Invalid Arguments'].get_string(
172+
command=self.command, subcommand=command) +
173+
' '.join(self[command].args))
172174

173175
# No need to go further
174176
return

addons/source-python/packages/source-python/plugins/instance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def __init__(self, plugin_name, base_import):
5353

5454
# Print a message that the plugin's main file was not found
5555
self.logger.log_message(self.prefix + _plugin_strings[
56-
'No Module'].get_string(plugin=plugin_name,
56+
'No Module'].get_string(
57+
plugin=plugin_name,
5758
file=file_path.replace(GAME_PATH, '').replace('\\', '/')))
5859

5960
# Raise an error so that the plugin

addons/source-python/packages/source-python/settings/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __new__(cls, name, default, *args):
3838
# Raise an error
3939
raise ValueError(
4040
'Given value must be of "{0}" type, not "{1}"'.format(
41-
cls._type.__name__, type(default).__name__))
41+
cls._type.__name__, type(default).__name__))
4242

4343
# Get the new object instance
4444
self = object.__new__(cls)

0 commit comments

Comments
 (0)