The Wayback Machine - https://web.archive.org/web/20201124172312/https://github.com/TheAlgorithms/Python/issues/3887
Skip to content
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

Guiding people using contibuting.md so they do not fail pre-commit #3887

Open
xcodz-dot opened this issue Nov 13, 2020 · 9 comments
Open

Guiding people using contibuting.md so they do not fail pre-commit #3887

xcodz-dot opened this issue Nov 13, 2020 · 9 comments

Comments

@xcodz-dot
Copy link
Contributor

@xcodz-dot xcodz-dot commented Nov 13, 2020

I have a simple instruction which is good to be kept in CONTRIBUTION.md. Please add this wherever it looks good:

  • clone your forked repository locally
  • change directory to its root
  • run pip install pre-commit
  • run pre-commit run --all-files
  • commit and push the changes to your fork.
@dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Nov 14, 2020

pre-commit is a plugin that runs automatically on git events. If you want you can open a PR to include the steps like so:

Pre-commit plugin

To forget about coding style and let pre-commit fix your flake8/isort/black issue.

  • Install pre-commit: $ python -m pip install pre-commit
  • And then: $ pre-commit install

That's it!

@xcodz-dot
Copy link
Contributor Author

@xcodz-dot xcodz-dot commented Nov 14, 2020

that seems to look good, almost 70% percent of pull request I see fails pre-commit which was hard to fix manually until i came to know we can use this locally to make changes

@Joe-Sin7h
Copy link

@Joe-Sin7h Joe-Sin7h commented Nov 15, 2020

hey , @dhruvmanila i would Love to work on this issue .
Pls assign this issue to me .

@xcodz-dot
Copy link
Contributor Author

@xcodz-dot xcodz-dot commented Nov 16, 2020

Well @Joe-Sin7h, You can start working and link this issue in your PR. No need to get assigned

@luperciomartine
Copy link

@luperciomartine luperciomartine commented Nov 21, 2020

1flake8/ isort/ black.

Instalar el compromiso previo: $ python -m pip install pre-commit
Y entonces: $ pre-commit installpip install pre-commit
correr pre-commit run --all-files

@luperciomartine
Copy link

@luperciomartine luperciomartine commented Nov 21, 2020

pre-commit --versiflake8/ isort/ black.

Instalar el compromiso previo: $ python -m pip install pre-commit
Y entonces: $ pre-commit installpyzarchivo de las versiones de github
correr python pre-commit-#.#.#.pyz ...en lugar depre-commit ...pre-commit --versi

@xcodz-dot
Copy link
Contributor Author

@xcodz-dot xcodz-dot commented Nov 22, 2020

Sorry, We understand english

@xcodz-dot xcodz-dot closed this Nov 22, 2020
@xcodz-dot xcodz-dot reopened this Nov 22, 2020
@ashishpapanai
Copy link

@ashishpapanai ashishpapanai commented Nov 24, 2020

Hello, I have made the necessary changes in CONTRIBUTING.md, and I am getting the following error when I try to commit the changes:
Check that executables have shebangs.....................................Passed Check Yaml...........................................(no files to check)Skipped Fix End of Files.....................................(no files to check)Skipped Trim Trailing Whitespace.................................................Passed Fix requirements.txt.................................(no files to check)Skipped black................................................(no files to check)Skipped isort................................................(no files to check)Skipped flake8...............................................(no files to check)Skipped codespell................................................................Passed Validate filenames.......................................................An unexpected error has occurred: OSError: [Errno 22] Invalid argument: 'C:\\Users\\Ashish Papanai\\AppData\\Local\\Microsoft\\WindowsApps\\python3.EXE' Check the log at C:\Users\Ashish Papanai\.cache\pre-commit\pre-commit.log
Could you please help me out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.