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

Add 'azdev format' #358

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open

Add 'azdev format' #358

wants to merge 18 commits into from

Conversation

dciborow
Copy link
Contributor

@dciborow dciborow commented Mar 9, 2023

Add azdev format to auto format code using black.

This automatically fixes issues like incorrect spacing for users and reduces time spent fixing issues found from azdev linter and azdev style.

@wangzelin007
Copy link
Member

I have some questions:

  1. Can black automatically fix all problems detected by azdev linter and azdev style?
  2. If it fixes some of the problems, what problems does it fix?
  3. If user use CodeGen tool to autogenerated cli and extensions code,  will black automatic change the format of autogenerated code?
    I think these codes does not need to be adjusted.

@dciborow
Copy link
Contributor Author

I have some questions:

  1. Can black automatically fix all problems detected by azdev linter and azdev style?
  2. If it fixes some of the problems, what problems does it fix?
  3. If user use CodeGen tool to autogenerated cli and extensions code,  will black automatic change the format of autogenerated code?
    I think these codes does not need to be adjusted.

I think it will fix ALL flake8 issues, and easy pylint issues. It won't fix something like "using private method", but it does fix things like "trailing whitespace".

Black can be configured to exclude directories. I will look into reusing the pylintrc config to try and do this. https://github.com/psf/black#configuration

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

Successfully merging this pull request may close these issues.

2 participants