Skip to content

Commit 77e6d1b

Browse files
committed
PyLint fix for Python 3.12
1 parent cf4da42 commit 77e6d1b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

platformio/fs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def _onexc(func, path, _):
223223
err=True,
224224
)
225225

226+
# pylint: disable=unexpected-keyword-arg, deprecated-argument
226227
if sys.version_info < (3, 12):
227228
return shutil.rmtree(path, onerror=_onexc)
228-
return shutil.rmtree(path, onexc=_onexc) # pylint: disable=unexpected-keyword-arg
229+
return shutil.rmtree(path, onexc=_onexc)

tests/project/test_config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ def test_nested_interpolation(tmp_path: Path):
654654
"""
655655
[platformio]
656656
build_dir = /tmp/pio-$PROJECT_HASH
657-
data_dir = /$PROJECT_DIR/assets
657+
data_dir = $PROJECT_DIR/assets
658658
659659
[env:myenv]
660660
build_flags = -D UTIME=${UNIX_TIME}
@@ -668,7 +668,9 @@ def test_nested_interpolation(tmp_path: Path):
668668
"""
669669
)
670670
config = ProjectConfig(str(project_conf))
671-
assert config.get("platformio", "data_dir") == "/$PROJECT_DIR/assets"
671+
assert config.get("platformio", "data_dir").endswith(
672+
os.path.join("$PROJECT_DIR", "assets")
673+
)
672674
assert config.get("env:myenv", "build_flags")[0][-10:].isdigit()
673675
testing_command = config.get("env:myenv", "test_testing_command")
674676
assert "$" not in " ".join(testing_command)

0 commit comments

Comments
 (0)