Skip to content

Commit 2d1381d

Browse files
author
Saimon Michelson
committed
update to pass flake and lint
1 parent 5021b5a commit 2d1381d

7 files changed

Lines changed: 10 additions & 10 deletions

File tree

cterasdk/asynchronous/edge/files/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async def exists(edge, path):
2727
try:
2828
await edge.io.propfind(path.absolute, 0)
2929
return True
30-
except HTTPError as e:
30+
except HTTPError:
3131
return False
3232

3333

cterasdk/cio/edge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def format_listdir_response(parent, response):
4444
for e in response:
4545
path = fetch_reference(e.href)
4646
if parent != path:
47-
is_dir = True if e.getcontenttype == 'httpd/unix-directory' else False
47+
is_dir = e.getcontenttype == 'httpd/unix-directory'
4848
param = Object(
4949
path=path,
5050
name=Path(path).name,
@@ -54,7 +54,7 @@ def format_listdir_response(parent, response):
5454
last_modified=datetime.strptime(e.getlastmodified, "%a, %d %b %Y %H:%M:%S GMT").isoformat(),
5555
size=e.getcontentlength
5656
)
57-
entries.append(param)
57+
entries.append(param)
5858
return entries
5959

6060

cterasdk/clients/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
from abc import ABC, abstractmethod
12
from http import HTTPStatus
23
from ..exceptions import HTTPError
34
from ..common import Object
45
from ..convert import fromjsonstr, fromxmlstr
5-
from abc import ABC, abstractmethod
66

77

88
class Error(Object):
@@ -122,7 +122,7 @@ def raise_error(status, error):
122122
HTTPStatus.INTERNAL_SERVER_ERROR: InternalServerError,
123123
HTTPStatus.BAD_GATEWAY: BadGateway,
124124
HTTPStatus.SERVICE_UNAVAILABLE: ServiceUnavailable,
125-
HTTPStatus.GATEWAY_TIMEOUT: GatewayTimeout
125+
HTTPStatus.GATEWAY_TIMEOUT: GatewayTimeout
126126
}
127127
exception = exceptions.get(status, HTTPError)
128128
raise exception(error)

cterasdk/convert/deserializers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def fromdavxmlstr(s):
117117

118118
root.value = None
119119
root.parent = None
120-
120+
121121
q = queue.Queue()
122122
q.put(root)
123123
while not q.empty():
@@ -168,7 +168,7 @@ def fromxmlstr(s): # pylint: disable=too-many-branches,too-many-statements
168168

169169
root.value = None
170170
root.parent = None
171-
171+
172172
q = queue.Queue()
173173
q.put(root)
174174
while not q.empty():

tests/ut/aio/direct/test_get_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ def _create_error_object():
108108
dict(request=munch.Munch(
109109
dict(url='/xyz')
110110
))
111-
)
111+
)

tests/ut/aio/direct/test_get_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from unittest import mock
55
import munch
66
from cterasdk.direct.lib import get_object
7-
from cterasdk import exceptions, ctera_direct, Object
7+
from cterasdk import exceptions, ctera_direct
88
from . import base
99

1010

tests/ut/aio/test_login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import munch
21
from unittest import mock
32
from http import HTTPStatus
3+
import munch
44
from cterasdk.common import Object
55
from cterasdk import exceptions
66
from tests.ut.aio import base_core

0 commit comments

Comments
 (0)