Skip to content

Commit

Permalink
avoid multiline reformats
Browse files Browse the repository at this point in the history
  • Loading branch information
ankona committed Feb 22, 2024
1 parent 0686af3 commit 626174a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
15 changes: 6 additions & 9 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,8 @@ class FileUtils:
@staticmethod
def get_test_output_path(caller_function: str, caller_fspath: str) -> str:
caller_file_to_dir = os.path.splitext(str(caller_fspath))[0]
rel_path = os.path.relpath(
caller_file_to_dir, os.path.dirname(test_output_root)
)
dir_name = os.path.dirname(test_output_root)
rel_path = os.path.relpath(caller_file_to_dir, dir_name)
dir_path = os.path.join(test_output_root, rel_path, caller_function)
return dir_path

Expand Down Expand Up @@ -660,9 +659,8 @@ def setup_test_colo(
if db_type == "uds" and colo_model_name is not None:
tmp_dir = tempfile.gettempdir()
socket_suffix = str(uuid.uuid4())[:7]
db_args["unix_socket"] = os.path.join(
tmp_dir, f"{colo_model_name}_{socket_suffix}.socket"
)
socket_name = f"{colo_model_name}_{socket_suffix}.socket"
db_args["unix_socket"] = os.path.join(tmp_dir, socket_name)

colocate_fun: t.Dict[str, t.Callable[..., None]] = {
"tcp": colo_model.colocate_db_tcp,
Expand All @@ -671,9 +669,8 @@ def setup_test_colo(
}
with warnings.catch_warnings():
if db_type == "deprecated":
warnings.filterwarnings(
"ignore", message="`colocate_db` has been deprecated"
)
message = "`colocate_db` has been deprecated"
warnings.filterwarnings("ignore", message=message)
colocate_fun[db_type](**db_args)
# assert model will launch with colocated db
assert colo_model.colocated
Expand Down
1 change: 0 additions & 1 deletion smartsim/_core/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ def installed_redisai_backends(

def get_ts_ms() -> int:
"""Return the current timestamp (accurate to milliseconds) cast to an integer"""
# return int(datetime.timestamp(datetime.now()))
return int(datetime.now().timestamp() * 1000)


Expand Down

0 comments on commit 626174a

Please sign in to comment.