-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add tests to follow PEP8 guidelines #226
Comments
I would like to work on this one @devkapilbansal |
You have been already assigned one issue. Please claim it after you send a successful PR for the former. |
@Aryamanz29 are you working on this? |
Yes, |
@devkapilbansal While testing my code locally most |
Are you using @mtreacy002's forked repo as the Mentorship backend? |
@Aryamanz29 , can you check if running the test from the Test Explorer of your VS Code IDE pass? I've asked since this is also happened to me when I'm using Windows OS (running tests inside the terminal failed but running them inside VS Code IDE Test explorer passed). I have opened an issue #133 to investigate this. ATM when using Windows OS, I just run the tests on the VS Code terminal. On MacOS this issue doesn't exist (both terminal and VS Code IDE work just fine). cc @epicadk |
@mtreacy002 Test fails same as they on the terminal, Now I'll try to set up this repo on my Linux machine to solve this problem😅 |
@Aryamanz29 , also, have you completed the compulsory #244 before working on this issue? You shouldn’t face this issue once you’ve successfully completed the task there. cc @epicadk |
I guess this was before I was your message 😅. @Aryamanz29 please complete #244 before you attempt this. |
I have raised PR #267 for env setup, Please have a look to it @epicadk |
@devkapilbansal and @epicadk , since we're running lint workflow using black, wouldn't this pr (using Flake8) contradicting the workflow. I mean the 2 (black and flake8) don't always play nice with each other 🤔 . Unless you're thinking of using flake8-black plugin, perhaps on the VSCode IDE? But I still don't see why we need to add flake8 workflow on top of black linting 🤔 |
Hi @mtreacy002 black is used to lint the code so to increase readability but flake8 ensures that the code follows Python standards specified by PEP8. |
May I ask what you think of the flake8-black plugin I mentioned above? wouldn't this be a faster and easier option instead of writing the config file, @devkapilbansal ? |
Yes, it looks good to. I was unaware of this. I think we can proceed with this instead of having flake8 and flask. |
Is your feature request related to a problem? Please describe.
PEP stands for Python Enhancement Proposal. It is a style document that documents some best practices
Describe the solution you'd like
Code written in Python should follow standard practices and PEP8 guidelines. For this a linter that follows these guidelines or some sort of checks can be implemented
Describe alternatives you've considered
I would suggest using Flake8 to test if PEP8 best practices are followed in the code written or not. Additionally, Flake8 workflow tests can be setup to ensure pull requests made follow these guidelines as well.
Additional context
Flake8 is not the only tool available and other alternatives can be considered.
The text was updated successfully, but these errors were encountered: