Skip to content

[#5] run black on all Python source code. #739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions irods/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(self, *args, **kwargs):
print("Aborting tests [ Got : %r ]" % self, file=sys.stderr)
os.abort()


class iRODS_Server_Too_Recent_For_Testing(StopTestsException):
pass

Expand All @@ -35,6 +36,7 @@ def _get_server_version_for_test(session, curtail_length):

# Create a connection for test, based on ~/.irods environment by default.


def make_session(test_server_version=False, **kwargs):
"""Connect to an iRODS server as determined by any client environment
file present at a standard location, and by any keyword arguments given.
Expand Down
6 changes: 3 additions & 3 deletions irods/test/data_obj_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def write_and_check_replica_on_parallel_connections(
data_object_path,
"a",
finalize_on_close=False,
**{kw.RESC_HIER_STR_KW: hier_str, kw.REPLICA_TOKEN_KW: replica_token}
**{kw.RESC_HIER_STR_KW: hier_str, kw.REPLICA_TOKEN_KW: replica_token},
)
fd2.seek(4)
fd2.write(b"s\n")
Expand Down Expand Up @@ -646,7 +646,7 @@ def test_compute_chksum(self):
Data.put(
f.name,
dobj_path,
**{kw.DEST_RESC_NAME_KW: R, kw.FORCE_FLAG_KW: "1"}
**{kw.DEST_RESC_NAME_KW: R, kw.FORCE_FLAG_KW: "1"},
)
# compare checksums
my_object = Data.get(dobj_path)
Expand Down Expand Up @@ -2092,7 +2092,7 @@ def test_data_open_on_leaf_is_disallowed__243(self):
self.sess.data_objects.open(
"{home}/disallowed_243".format(**locals()),
"w",
**{kw.RESC_NAME_KW: Leaf}
**{kw.RESC_NAME_KW: Leaf},
)

def test_data_open_on_named_resource__243(self):
Expand Down
12 changes: 7 additions & 5 deletions irods/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
import threading

import irods.client_configuration as config
from irods.helpers import (
home_collection,
make_session as _irods_helpers_make_session)
from irods.helpers import home_collection, make_session as _irods_helpers_make_session
from irods.message import iRODSMessage, IRODS_VERSION
from irods.password_obfuscation import encode
import irods.rule
Expand Down Expand Up @@ -164,11 +162,15 @@ def recast(k):


def make_session(test_server_version=True, **kwargs):
return _irods_helpers_make_session(test_server_version=test_server_version, **kwargs)
return _irods_helpers_make_session(
test_server_version=test_server_version, **kwargs
)


make_session.__doc__ = re.sub(
r"(test_server_version\s*)=\s*\w+", r"\1 = True", _irods_helpers_make_session.__doc__
r"(test_server_version\s*)=\s*\w+",
r"\1 = True",
_irods_helpers_make_session.__doc__,
)


Expand Down