Update dependencies and copyright year (#2436)

- aiohttp 3.5
- websockets 7
- Rapptz/discord.py@700dbb5
- A few others

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine
2019-02-13 10:49:11 +11:00
committed by Toby Harradine
parent cfd8ef6025
commit 7c8ac9cd54
52 changed files with 423 additions and 280 deletions

View File

@@ -3,7 +3,7 @@
"""
The MIT License (MIT)
Copyright (c) 2015-2017 Rapptz
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -385,22 +385,18 @@ class Command:
# for use with a manual undo
previous = view.index
# parsing errors get propagated
view.skip_ws()
argument = quoted_word(view)
try:
value = await self.do_conversion(ctx, converter, argument, param)
except CommandError:
if not result:
if required:
raise
else:
view.index = previous
return param.default
view.index = previous
break
else:
result.append(value)
if not result and not required:
return param.default
return result
async def _transform_greedy_var_pos(self, ctx, param, converter):
@@ -750,9 +746,9 @@ class Command:
If that lookup leads to an empty string then the first line of the
:attr:`help` attribute is used instead.
"""
if self.brief:
if self.brief is not None:
return self.brief
if self.help:
if self.help is not None:
return self.help.split("\n", 1)[0]
return ""
@@ -771,7 +767,7 @@ class Command:
name = self.name if not parent else parent + " " + self.name
result.append(name)
if self.usage:
if self.usage is not None:
result.append(self.usage)
return " ".join(result)