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

Formatting with Black? #1736

Open
dbluhm opened this issue Feb 16, 2022 · 4 comments
Open

Formatting with Black? #1736

dbluhm opened this issue Feb 16, 2022 · 4 comments

Comments

@dbluhm
Copy link
Member

dbluhm commented Feb 16, 2022

In other python projects in the Hyperledger Ecosystem, black is used to help keep coding style consistent. I think Node would benefit from a similar treatment. This would however mean that we would need to essentially reformat every file in the project which is less than ideal. I think the improved formatting would be worth it but I'm interested to hear thoughts from others.

@WadeBarnes
Copy link
Member

We'd want to do this for node and plenum. I'm in support of the proposal.

@pSchlarb
Copy link
Contributor

Does it make sense, to incorporate that into the pipeline?
https://github.com/rickstaa/action-black/

@dbluhm
Copy link
Member Author

dbluhm commented Feb 21, 2022

I am in favor of adding a format checker to the pipeline; this is how ACA-Py does it. If there are issues, it doesn't automatically commit reformatting so the original author has to fix formatting themselves. I personally favor this approach over any auto-commits from the pipeline.

@pSchlarb
Copy link
Contributor

Currently the ubtunu-20.04 branches for plenum, node and sovrin token-plugin use the indy-shared-gha linting process from here.
It is currently using flake8 in with the following versions:
flake8==3.8.4
pep8==1.7.1
pep8-naming==0.6.1
The token-plugin is also linted with the updated versions of those.
Should we use the existing one and upgrade the definitions? Or switch to black?

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

No branches or pull requests

3 participants