PyLint fix for Python 3.12

This commit is contained in:
Ivan Kravets
2023-12-09 13:51:51 +02:00
parent cf4da42b25
commit 77e6d1b099
2 changed files with 6 additions and 3 deletions

View File

@ -223,6 +223,7 @@ def rmtree(path):
err=True, err=True,
) )
# pylint: disable=unexpected-keyword-arg, deprecated-argument
if sys.version_info < (3, 12): if sys.version_info < (3, 12):
return shutil.rmtree(path, onerror=_onexc) return shutil.rmtree(path, onerror=_onexc)
return shutil.rmtree(path, onexc=_onexc) # pylint: disable=unexpected-keyword-arg return shutil.rmtree(path, onexc=_onexc)

View File

@ -654,7 +654,7 @@ def test_nested_interpolation(tmp_path: Path):
""" """
[platformio] [platformio]
build_dir = /tmp/pio-$PROJECT_HASH build_dir = /tmp/pio-$PROJECT_HASH
data_dir = /$PROJECT_DIR/assets data_dir = $PROJECT_DIR/assets
[env:myenv] [env:myenv]
build_flags = -D UTIME=${UNIX_TIME} build_flags = -D UTIME=${UNIX_TIME}
@ -668,7 +668,9 @@ test_testing_command =
""" """
) )
config = ProjectConfig(str(project_conf)) config = ProjectConfig(str(project_conf))
assert config.get("platformio", "data_dir") == "/$PROJECT_DIR/assets" assert config.get("platformio", "data_dir").endswith(
os.path.join("$PROJECT_DIR", "assets")
)
assert config.get("env:myenv", "build_flags")[0][-10:].isdigit() assert config.get("env:myenv", "build_flags")[0][-10:].isdigit()
testing_command = config.get("env:myenv", "test_testing_command") testing_command = config.get("env:myenv", "test_testing_command")
assert "$" not in " ".join(testing_command) assert "$" not in " ".join(testing_command)