Bump flake8 version and handle new lint errors (#1385)
This commit is contained in:
parent
499857e67f
commit
279efc6b12
5 changed files with 11 additions and 11 deletions
|
|
@ -3,12 +3,12 @@ from six.moves.urllib.parse import urlparse
|
|||
|
||||
|
||||
def bucket_name_from_url(url):
|
||||
pth = urlparse(url).path.lstrip("/")
|
||||
path = urlparse(url).path.lstrip("/")
|
||||
|
||||
l = pth.lstrip("/").split("/")
|
||||
if len(l) == 0 or l[0] == "":
|
||||
parts = path.lstrip("/").split("/")
|
||||
if len(parts) == 0 or parts[0] == "":
|
||||
return None
|
||||
return l[0]
|
||||
return parts[0]
|
||||
|
||||
|
||||
def parse_key_name(path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue