Fix pre-commit

This commit is contained in:
Shane Lee 2024-07-19 10:52:09 -06:00 committed by Daniel Wozniak
parent 0675d1fec7
commit 101a773df1
4 changed files with 11 additions and 10 deletions

View file

@ -11,8 +11,8 @@ from salt.exceptions import CommandExecutionError
from tests.support.mock import MagicMock, patch
TARGET = []
if os.environ.get('VENV_PIP_TARGET'):
TARGET = ["--target", os.environ.get('VENV_PIP_TARGET')]
if os.environ.get("VENV_PIP_TARGET"):
TARGET = ["--target", os.environ.get("VENV_PIP_TARGET")]
class FakeFopen:

View file

@ -1,4 +1,5 @@
import os
import pytest
import salt.loader.context
@ -12,7 +13,7 @@ pytestmark = [
]
SALT_CALL_BINARY = "salt-call"
if os.environ.get('VIRTUAL_ENV'):
if os.environ.get("VIRTUAL_ENV"):
SALT_CALL_BINARY = f"{os.environ.get('VIRTUAL_ENV')}/bin/salt-call"

View file

@ -75,9 +75,7 @@ def test_file_server_url_escape(tmp_path):
opts = {
"fileserver_backend": ["roots"],
"extension_modules": "",
"optimization_order": [
0, 1
],
"optimization_order": [0, 1],
"file_roots": {
"base": [fileroot],
},
@ -102,9 +100,7 @@ def test_file_server_serve_url_escape(tmp_path):
opts = {
"fileserver_backend": ["roots"],
"extension_modules": "",
"optimization_order": [
0, 1
],
"optimization_order": [0, 1],
"file_roots": {
"base": [fileroot],
},

View file

@ -3,7 +3,11 @@ import pytest
import salt.utils.msgpack
from tests.support.mock import MagicMock, patch
@pytest.mark.skipif(salt.utils.msgpack.version < (1, 0, 0), reason="Test requires msgpack version >= 1.0.0")
@pytest.mark.skipif(
salt.utils.msgpack.version < (1, 0, 0),
reason="Test requires msgpack version >= 1.0.0",
)
def test_load_encoding(tmp_path):
"""
test when using msgpack version >= 1.0.0 we