Skip to content

Commit

Permalink
Python formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
spirali committed Aug 29, 2022
1 parent 4f14abd commit e024ce8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions scripts/print_vers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@

ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


def check_file(path, prefix, case_sensitive=False):
with open(os.path.join(ROOT_DIR, path), "r") as f:
for line in f:
line = line.strip()
if case_sensitive:
line = line.lower()
if line.startswith(prefix):
print(path,":", line)
print(path, ":", line)


check_file("crates/hyperqueue/Cargo.toml", "version")
check_file("crates/pyhq/Cargo.toml", "version")
check_file("nedoc.conf", "project_version")
check_file("CHANGELOG.md", "# dev", case_sensitive=True)
check_file("CHANGELOG.md", "# dev", case_sensitive=True)
3 changes: 2 additions & 1 deletion tests/pyapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os.path
from typing import List, Tuple

from hyperqueue import LocalCluster
from hyperqueue.client import Client
from hyperqueue.job import Job

from hyperqueue import LocalCluster

from ..conftest import HqEnv
from ..utils.mock import ProgramMock

Expand Down
1 change: 0 additions & 1 deletion tests/pyapi/test_cluster.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from hyperqueue.cluster import LocalCluster, WorkerConfig
from hyperqueue.job import Job

Expand Down
1 change: 0 additions & 1 deletion tests/pyapi/test_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pathlib import Path

import pytest

from hyperqueue.client import Client, FailedJobsException, PythonEnv
from hyperqueue.ffi.protocol import ResourceRequest
from hyperqueue.job import Job
Expand Down
1 change: 0 additions & 1 deletion tests/pyapi/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import iso8601
import pytest

from hyperqueue.client import FailedJobsException
from hyperqueue.ffi.protocol import ResourceRequest
from hyperqueue.job import Job
Expand Down

0 comments on commit e024ce8

Please sign in to comment.