Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
willow-ahrens committed Jan 6, 2025
1 parent d36a0ce commit 59243fd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
18 changes: 9 additions & 9 deletions src/juliapkg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from .deps import (
PkgSpec,
add,
executable,
offline,
project,
require_julia,
resolve,
rm,
status,
PkgSpec,
add,
executable,
offline,
project,
require_julia,
resolve,
rm,
status,
)

__all__ = [
Expand Down
5 changes: 3 additions & 2 deletions src/juliapkg/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .compat import Compat, Version
from .find_julia import find_julia, julia_version
from .install_julia import log
from .state import STATE, thread_lock, process_lock
from .state import STATE, process_lock, thread_lock

logger = logging.getLogger("juliapkg")

Expand Down Expand Up @@ -314,7 +314,8 @@ def resolve(force=False, dry_run=False):
log(f"Using Julia project at {project}")
os.makedirs(project, exist_ok=True)
if not STATE["offline"]:
# write a Project.toml specifying UUIDs and compatibility of required packages
# write a Project.toml specifying UUIDs and compatibility of required
# packages
with open(os.path.join(project, "Project.toml"), "wt") as fp:
print("[deps]", file=fp)
for pkg in pkgs:
Expand Down
6 changes: 3 additions & 3 deletions src/juliapkg/find_julia.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from .compat import Compat, Version
from .install_julia import best_julia_version, get_short_arch, install_julia, log
from .state import STATE, thread_lock, process_lock
from .state import STATE, process_lock, thread_lock


def julia_version(exe):
Expand Down Expand Up @@ -51,8 +51,8 @@ def find_julia(compat=None, prefix=None, install=False, upgrade=False):
else:
if compat is not None and ev_ver not in compat:
log(
f"WARNING: juliapkg_exe={ev_exe} is Julia {ev_ver} but {compat} is"
" required."
f"WARNING: juliapkg_exe={ev_exe} is Julia {ev_ver} but {compat}"
"is required."
)
return (ev_exe, ev_ver)
# first look in the prefix
Expand Down
1 change: 1 addition & 0 deletions src/juliapkg/state.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import sys
from threading import RLock

from filelock import FileLock

thread_lock = RLock()
Expand Down
6 changes: 3 additions & 3 deletions test/test_all.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import json
import os
import subprocess
import tempfile
from multiprocessing import Pool

import juliapkg
import subprocess
from multiprocessing import Pool


def test_import():
Expand All @@ -25,7 +25,7 @@ def test_resolve():

def resolve_in_tempdir(tempdir):
subprocess.run(
["python", "-c", f"import juliapkg; juliapkg.resolve()"],
["python", "-c", "import juliapkg; juliapkg.resolve()"],
env=dict(os.environ, PYTHON_JULIAPKG_PROJECT=tempdir),
)

Expand Down

0 comments on commit 59243fd

Please sign in to comment.