Skip to content

Commit 63c7e45

Browse files
committed
Do not use two path packages
The use of `os.path` has been replaced by the `pathlib.Path` object.
1 parent e807e07 commit 63c7e45

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lkql_jit/standalone/make_native.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"""
4242

4343
import os
44-
import os.path
4544
import subprocess
4645
import sys
4746

@@ -63,7 +62,7 @@ def look_for_files_in_env(files: list[str], env_var_name: str) -> dict[str, str]
6362
res: dict[str, str | None] = {f: None for f in files}
6463
for directory in os.environ.get(env_var_name, "").split(os.pathsep):
6564
for file in files:
66-
if os.path.isfile(os.path.join(directory, file)):
65+
if Path(directory, file).is_file():
6766
res[file] = directory
6867
break
6968
one_not_found = False
@@ -168,7 +167,7 @@ def look_for_files_in_env(files: list[str], env_var_name: str) -> dict[str, str]
168167
# Finally specify the main class name and the output file
169168
final_cmd = cmd + [
170169
"com.adacore.lkql_jit.cli.LKQLMain",
171-
os.path.join("target", "lkql"),
170+
str(Path("target", "lkql")),
172171
]
173172

174173
# Debug print and run

0 commit comments

Comments
 (0)