Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci

Signed-off-by: Bernát Gábor <[email protected]>
  • Loading branch information
pre-commit-ci[bot] authored and gaborbernat committed Jun 27, 2023
1 parent 01b2ce2 commit 2af6e3c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/virtualenv/activation/via_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def generate(self, creator):
generated = self._generate(replacements, self.templates(), dest_folder, creator)
if self.flag_prompt is not None:
creator.pyenv_cfg["prompt"] = self.flag_prompt
return generated # noqa: RET504
return generated

def replacements(self, creator, dest_folder): # noqa: ARG002
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def sources(cls, interpreter):
@property
def reload_code(self):
result = super().reload_code
result = dedent(
return dedent(
f"""
# the bundled site.py always adds the global site package if we're on python framework build, escape this
import sys
Expand All @@ -86,7 +86,6 @@ def reload_code(self):
sys._framework = before
""",
)
return result


def fix_mach_o(exe, current, new, max_size):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/discovery/py_info/test_py_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def test_py_info_cached_error(mocker, tmp_path, session_app_data):


@pytest.mark.skipif(not fs_supports_symlink(), reason="symlink is not supported")
@pytest.mark.xfail(IS_PYPY and IS_WIN and sys.version_info[0:2] == (3, 9), reason="symlink is not supported")
def test_py_info_cached_symlink_error(mocker, tmp_path, session_app_data):
spy = mocker.spy(cached_py_info, "_run_subprocess")
with pytest.raises(RuntimeError):
Expand All @@ -145,6 +144,7 @@ def test_py_info_cache_clear(mocker, session_app_data):
assert spy.call_count >= 2 * count


@pytest.mark.xfail(IS_PYPY and IS_WIN and sys.version_info[0:2] == (3, 9), reason="symlink is not supported")
@pytest.mark.skipif(not fs_supports_symlink(), reason="symlink is not supported")
def test_py_info_cached_symlink(mocker, tmp_path, session_app_data):
spy = mocker.spy(cached_py_info, "_run_subprocess")
Expand Down

0 comments on commit 2af6e3c

Please sign in to comment.