Skip to content

Commit 9d2b89e

Browse files
committed
Miscellaneous cleanup from ipfs-shipyard#260 and ipfs-shipyard#262
1 parent e77c1eb commit 9d2b89e

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

ipfshttpclient/client/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
VERSION_BLACKLIST = []
1919
VERSION_MAXIMUM = "0.8.0"
2020

21+
from . import base
2122
from . import bitswap
2223
from . import block
2324
from . import bootstrap
@@ -87,7 +88,7 @@ def connect(
8788
headers: http.headers_t = {},
8889
timeout: http.timeout_t = 120,
8990

90-
# Backward-compat
91+
# Backward-compatibility
9192
username: ty.Optional[str] = None,
9293
password: ty.Optional[str] = None
9394
):
@@ -106,6 +107,7 @@ def connect(
106107
All parameters are identical to those passed to the constructor of the
107108
:class:`~ipfshttpclient.Client` class.
108109
"""
110+
109111
# Create client instance
110112
client = Client(
111113
addr, base,

ipfshttpclient/filescanner.py

-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@
2020
else: #PY36-
2121
re_pattern_t = re_pattern_type = type(re.compile(""))
2222

23-
2423
# Windows does not have os.O_DIRECTORY
2524
O_DIRECTORY: int = getattr(os, "O_DIRECTORY", 0)
2625

27-
2826
# Neither Windows nor MacOS have os.fwalk even through Python 3.9
2927
HAVE_FWALK: bool = hasattr(os, "fwalk")
3028
HAVE_FWALK_BYTES = HAVE_FWALK and sys.version_info >= (3, 7)

ipfshttpclient/http.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
PREFER_HTTPX = (os.environ.get("PY_IPFS_HTTP_CLIENT_PREFER_HTTPX", "no").lower()
2121
not in ("0", "f", "false", "n", "no"))
2222
if PREFER_HTTPX: # pragma: http-backend=httpx
23-
try: #PY36+
23+
try:
2424
from . import http_httpx as _backend
25-
except (ImportError, SyntaxError): #PY35
25+
except ImportError:
2626
from . import http_requests as _backend # type: ignore[no-redef]
2727
else: # pragma: http-backend=requests
2828
try:
2929
from . import http_requests as _backend # type: ignore[no-redef]
3030
except ImportError: # pragma: no cover
3131
from . import http_httpx as _backend
3232

33-
ClientSync = _backend.ClientSync
33+
ClientSync = _backend.ClientSync

ipfshttpclient/http_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ def download(
676676
args
677677
Positional parameters to be sent along with the HTTP request
678678
opts
679-
Query string paramters to be sent along with the HTTP request
679+
Query string parameters to be sent along with the HTTP request
680680
compress
681681
Whether the downloaded file should be GZip compressed by the
682682
daemon before being sent to the client

ipfshttpclient/multipart.py

+1
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ def __init__(self, directory: ty.Union[ty.AnyStr, utils.PathLike[ty.AnyStr], int
397397

398398
# Figure out the absolute path of the directory added
399399
self.abspath = None
400+
400401
if not isinstance(directory, int):
401402
self.abspath = os.path.abspath(directory)
402403

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,3 @@ classifiers = [
5050

5151
[tool.flit.metadata.urls]
5252
Documentation = "https://ipfs.io/ipns/12D3KooWEqnTdgqHnkkwarSrJjeMP2ZJiADWLYADaNvUb6SQNyPF/docs/"
53-

0 commit comments

Comments
 (0)