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
No configuration found when is used with git hook #28
Conversation
… hook. Files with changes are moved to a temporal directory when flake8 git hook is used. $ flake8 --install-hook git flake8-isort should look for configuration files in the current directory while checking the files in the temporary directory. Before fix, no configuration is found. $ git commit -m "Commit message" [DEBUG] full_path = /tmp/tmpl7f83uys/home/user/src/project/script.py script.py:0:1: I002 no configuration found (.isort.cfg or [isort] on setup.cfg) After fix, project configuration is found. $ git commit -m "Commit message" [DEBUG] full_path = /home/user/src/project/script.py script.py:1:1: D200 One-line docstring should fit on one line with quotes
@sergio-alonso hi! thanks for the pull request! travis is failing due to a flake8 error, would you mind fixing it so that we can check if tests do pass after your changes? Thanks in advance! |
@sergio-alonso thanks for fixing it! Now that I check in more detail I did not know that flake8 had a way to integrate with git/mercurial, thanks for pointing that out! Two last things:
|
Hi @gforcada , I'm trying to figure out how to test it. |
@sergio-alonso any progress so far? Looking at the code a bit more carefully I see that the code on |
I move it to #30 thanks for your work, I will try to release it during today or tomorrow. |
@sergio-alonso I made a new release (2.2) with your fix, would you mind giving it a try? thanks in advance. |
Thanks @gforcada I will try it. |
Files with changes are moved to a temporal directory when flake8 git hook is used.
$ flake8 --install-hook git
flake8-isort should look for configuration files in the current directory while checking the files in the temporary directory.
Before fix, no configuration is found.
$ git commit -m "Commit message"
script.py:0:1: I002 no configuration found (.isort.cfg or [isort] on setup.cfg)
After fix, project configuration is found.
$ git commit -m "Commit message"
script.py:1:1: D200 One-line docstring should fit on one line with quotes