-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
broken pre-commit hook in v1.13.0 #430
Comments
I don't quite understand why it fails within pre-commit, but succeeds when I |
ideally it should just use the wheel from pypi instead of trying to build it. maybe @KotlinIsland could take a look as he's more familiar with pre-commit than me |
As I mentioned in AThePeanut4/docify#3, I believe that adding a valid |
I'm seeing this, not sure what anything here means 😅 uv pip install git+https://github.com/AThePeanut4/docify@8896d7f4f3543b4f48ef8ebdec3b96250d5d1900
Updated https://github.com/AThePeanut4/docify (8896d7f)
error: Failed to build: `git+https://github.com/AThePeanut4/docify@8896d7f4f3543b4f48ef8ebdec3b96250d5d1900`
Caused by: Invalid source distribution: The archive contains neither a `pyproject.toml` nor a `setup.py` file at the top level |
it shouldnt need to install docify at all because it shouldn't be trying to build the package itself. is there a way to make pre-commit install it from pypi instead? |
In the pre-commit docs it says
So if I understand correctly, after it does a So that must be where it attempts to install |
I don't think that's what it means, I think it means that within the environment, there must be an executable with the name of the 'entry', in this case |
I think that pre-commit always installs the repo at the url and doesn't use pypi, we could refactor to a config that uses a pre-commit is not a very good tool, I don't know why it's considered industry standard... |
Maybe this? - name: basedpyright
- description: 'pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server'
- entry: basedpyright
- language: local
- 'types_or': [ python, pyi ]
- require_serial: true
- additional_dependencies: [ basedpyright==1.13.0 ]
- minimum_pre_commit_version: '2.9.2' |
ergh, I think we would need to do something like this https://github.com/psf/black-pre-commit-mirror/blob/main/.pre-commit-hooks.yaml Create a new repo that just installs basedpyright... |
At least a repo like that doesn't seem like it's a lot of effort to create or maintain 🤷🏻 |
just forked the black mirror. wanna check if this works? https://github.com/DetachHead/basedpyright-pre-commit-mirror |
@DetachHead I checked it, but this is what I get:
|
sorry, forgot to push a tag. try again now |
@DetachHead yes it works! |
It appears to be related to the
docify
dependency, specifically that it.pre-commit-config.yaml
command:
output:
contents of
~/.cache/pre-commit/pre-commit.log
:The text was updated successfully, but these errors were encountered: