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

Increase code style lint #278

Closed
pvk-developer opened this issue Oct 29, 2021 · 0 comments · Fixed by #288
Closed

Increase code style lint #278

pvk-developer opened this issue Oct 29, 2021 · 0 comments · Fixed by #288
Labels
internal The issue doesn't change the API or functionality

Comments

@pvk-developer
Copy link
Member

pvk-developer commented Oct 29, 2021

Problem Description

Currently our code is being validated only by flake8 'vanilla' and just a few plugins. We would like to increase the code style checks by adding more add-on's that follow our code style and our standards.

Also we would like to ensure that our docstrings are properly written and follow the rest of our format.

Additional context

We have performed this task already on RDT , more precisely on the following issue:
sdv-dev/RDT#248 (comment)

Docstring plugin

We need to add pydocstyle plugin with the following lines on our setup.cfg file as we are following the google convention.

[pydocstyle]
convention = google
add-ignore = D107, D407, D417

Flake8 plugins to be added

Flake8 comes with a lot of different addons that we can use to adapt it to our codestyle and checking, here is a list of plugins that I found to be interesting for us:

  • flake8-builtins - Check for python builtins being used as variables or parameters.
  • flake8-comprehensions - Helps you write better list/set/dict comprehensions.
  • flake8-debugger - Debug statement checker.
  • flake8-variables-names - Extension that helps to make more readable variables names.
  • Dlint - Tool for encouraging best coding practices and helping ensure Python code is secure.
  • flake8-mock - Provides checking mock non-existent methods.
  • flake8-fixme - Check for FIXME, TODO and other temporary developer notes.
  • flake8-eradicate - Plugin to find commented out or dead code.
  • flake8-mutable - Extension for mutable default arguments.
  • flake8-print - Check for print statements in python files.
  • flake8-pytest-style - Plugin checking common style issues or inconsistencies.
  • flake8-quotes - Extension for checking quotes in python.
  • flake8-multiline-containers - Plugin to ensure a consistent format for multiline containers.
  • pandas-vet - Plugin that provides opinionated linting for pandas code.
  • pep8-naming - Check the PEP-8 naming conventions.
  • flake8-expression-complexity - Plugin to validate expressions complexity.
  • flake8-sfs - String formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal The issue doesn't change the API or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant