-
Notifications
You must be signed in to change notification settings - Fork 20
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
"strange" interaction with m_style and pre-commit #227
Comments
That rule ( |
Also, I tried running through your instructions above and I was able to commit:
Is there a missing instruction for pre-commit, or did it just silently work? |
I think I will add way to show the version (in addition to |
Show version and continue as normal: helpful to debug CI issues.
I think I had forgotten an instruction to run |
Hum... Whether I use a virtual environment or my base conda environment I get the same version. I must be messing something up but not sure what.
|
You could try changing your hook to invoke
|
@Remi-Gau do you have any updates/news here to point me in the right direction? |
hey So the hook is not using the right version. This is the version in my environment. ╰─(env) ⠠⠵ mh_style -v
MISS_HIT 0.9.28 If I use this hook with pre commit: repos:
- repo: local
hooks:
- id: mh_version
name: mh_version
entry: mh_style
args: [-v]
verbose: true
language: python
additional_dependencies: [miss_hit_core] I get this:
|
More confusion. Outside of all my environments I get this
My base conda environment gives me this
So I am not quite sure where the hook is getting its command from. |
Ugh :( I think, when I looked at this pre-commit beast, they did some "clever" stuff with installing things in some local environment; and that the way we configured it was not the official recommended one. And that didn't work because I didn't quite set up the mh repo structure right and it would have been a major pain to fix it. |
Do you want me to open an issue on the pre-commit repo to ask for guidance? |
I suspect we'll hear the same thing we got told last time: make the miss_hit repo conform by having only a single There is good reasons why I don't want to do that; because it makes developing and running MISS_HIT way harder (I'd have to mess around with pythonpath all the time). But maybe there is a better way we can set up the hook; or at least force an update of the tool in the local checked-in version that pre-commit seems to use. I wish it could be made to just use the system installed one, but apparently that is not so easy :/ |
OK I see. Will look at regular interval if I can find a way to set up the hook differently. In the meantime I think I will just try to make sure I always use the latest version of miss_hit in all my environments. |
miss_hit complains about an invalid config file when running a hook but is fine otherwise
MISS_HIT Component affected
Possibly other components: I have not checked yet
Your operating system and Python version
This happens on this "sandbox" repo: https://github.com/Remi-Gau/clean_code_style
This should help reproduce the issue:
This throws this error:
But simply running
mh_style
works fine.Not sure what is happening and I suspect this might be some weird interaction between miss hit and pre-commit
The text was updated successfully, but these errors were encountered: