Check code style: Using pre-commit hooks (recommended) #933
-
Hello, I have been trying to use 1- I follow the steps but I got this error: 4- conda create -n py310 python=3.10 5- I checked the python version and it was 3.10. However, again, I got error while doing the 6-I created another virtual environment with python 3.9... and then follow the steps provided in 7-It seems everything went well. 8-I did a simple commit to see how things would go:
So far, it seems things are good. Correct? Since I did Ok, now let us try it on the some directories:
Isn't it weird? I tried black on another package, and it worked fine...
I was wondering if someone can explain what is going on. The same issue exists for flake8...
Now, in
One last information that might help:
Then, after talking to the owner(i.e. main maintainer) of package, we thought something is probably wrong in my environment. So, I created a virtual environment with help of
If I remember correctly, I did the same for I am trying to understand what is happing inside my computer. I think things can go wrong when I sometime use It would be great if someone can provide me with a source (like a link to a weblog or something) that explains these specific stuff...like setting PATH for package, or pip-vs-conda, and stuff. It is really confusing... |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Oh this sounds tricky! I actually just set up the black formatting and pre-commit hook stuff this week, and it's all pretty new so there may be some kinks. Regarding Python 3.9, that's a good point. I didn't know this could cause issues, and I am happy to downgrade it to say Python 3.6 or 3.7. I am curious about the following though. Let's assume you
Maybe if this works and you can run it in your standard environment, maybe then solves also these other issues you are getting. I think it's worth a try. |
Beta Was this translation helpful? Give feedback.
-
Oh I have an idea, how about replacing |
Beta Was this translation helpful? Give feedback.
-
Huh, that's weird. Never seen something like this before. Can you check if this is a current version of black? The
|
Beta Was this translation helpful? Give feedback.
-
Nice, glad to hear it's finally working! |
Beta Was this translation helpful? Give feedback.
Nice, glad to hear it's finally working!