pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pre-commit/pre-commit/commit/fcbc745744377ef2c9fe6a7e1a21c67d797933dc

ef="https://github.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> Merge pull request #3597 from pre-commit/empty-setup-py · pre-commit/pre-commit@fcbc745 · GitHub
Skip to content

Commit fcbc745

Browse files
authored
Merge pull request #3597 from pre-commit/empty-setup-py
fix python local template when artifact dirs are present
2 parents 67e8faf + 51592ee commit fcbc745

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from setuptools import setup
22

33

4-
setup(name='pre-commit-placeholder-package', version='0.0.0')
4+
setup(name='pre-commit-placeholder-package', version='0.0.0', py_modules=[])

tests/languages/python_test.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
from pre_commit.envcontext import envcontext
1111
from pre_commit.languages import python
1212
from pre_commit.prefix import Prefix
13+
from pre_commit.store import _make_local_repo
14+
from pre_commit.util import cmd_output_b
1315
from pre_commit.util import make_executable
1416
from pre_commit.util import win_exe
1517
from testing.auto_namedtuple import auto_namedtuple
@@ -351,3 +353,15 @@ def test_python_hook_weird_setup_cfg(tmp_path):
351353

352354
ret = run_language(tmp_path, python, 'socks', [os.devnull])
353355
assert ret == (0, f'[{os.devnull!r}]\nhello hello\n'.encode())
356+
357+
358+
def test_local_repo_with_other_artifacts(tmp_path):
359+
cmd_output_b('git', 'init', tmp_path)
360+
_make_local_repo(str(tmp_path))
361+
# pretend a rust install also ran here
362+
tmp_path.joinpath('target').mkdir()
363+
364+
ret, out = run_language(tmp_path, python, 'python --version')
365+
366+
assert ret == 0
367+
assert out.startswith(b'Python ')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy