Skip to content

Commit 7abed38

Browse files
Black
1 parent 0d853ef commit 7abed38

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ function open {
6464

6565
function clean {
6666
(root
67-
isort hug/*.py setup.py tests/*.py)
67+
isort hug/*.py setup.py tests/*.py
68+
black -l 100 hug)
6869
}
6970

7071

hug/api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,14 @@ def output_format(self, formatter):
471471
def __str__(self):
472472
output = "{0}\n\nAvailable Commands:\n\n".format(self.api.doc or self.api.name)
473473
for command_name, command in self.commands.items():
474-
command_string = " - {}{}".format(command_name, ": " + str(command).replace("\n", " ") if str(command) else "")
475-
output += (command_string[:77] + "..." if len(command_string) > 80 else command_string)
474+
command_string = " - {}{}".format(
475+
command_name, ": " + str(command).replace("\n", " ") if str(command) else ""
476+
)
477+
output += command_string[:77] + "..." if len(command_string) > 80 else command_string
476478
output += "\n"
477479
return output
478480

481+
479482
class ModuleSingleton(type):
480483
"""Defines the module level __hug__ singleton"""
481484

hug/interface.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,11 @@ def exit_callback(message):
597597

598598
for field, type_handler in self.reaffirm_types.items():
599599
if field in pass_to_function:
600-
if not pass_to_function[field] and type_handler in (list, tuple, hug.types.Multiple):
600+
if not pass_to_function[field] and type_handler in (
601+
list,
602+
tuple,
603+
hug.types.Multiple,
604+
):
601605
pass_to_function[field] = type_handler(())
602606
else:
603607
pass_to_function[field] = self.initialize_handler(

0 commit comments

Comments
 (0)