diff --git a/src/virtualenv/activation/via_template.py b/src/virtualenv/activation/via_template.py index 994876c32..239318cde 100644 --- a/src/virtualenv/activation/via_template.py +++ b/src/virtualenv/activation/via_template.py @@ -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 { diff --git a/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py b/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py index 598abfaa8..42c191fcb 100644 --- a/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py +++ b/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py @@ -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 @@ -86,7 +86,6 @@ def reload_code(self): sys._framework = before """, ) - return result def fix_mach_o(exe, current, new, max_size): diff --git a/tests/unit/discovery/py_info/test_py_info.py b/tests/unit/discovery/py_info/test_py_info.py index d1f707ed0..89c98dfc4 100644 --- a/tests/unit/discovery/py_info/test_py_info.py +++ b/tests/unit/discovery/py_info/test_py_info.py @@ -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): @@ -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")