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

Black format check result inconsistent between different Black versions #225

Closed
HiromuHota opened this issue Mar 22, 2019 · 1 comment · Fixed by #226
Closed

Black format check result inconsistent between different Black versions #225

HiromuHota opened this issue Mar 22, 2019 · 1 comment · Fixed by #226

Comments

@HiromuHota
Copy link
Contributor

HiromuHota commented Mar 22, 2019

Describe the bug

Black format check result is inconsistent between 18.9b0+ and 18.6b3 as described below.

$ black --version
black, version 18.9b0
$ black src/ --diff
All done! ✨ 🍰 ✨
90 files left unchanged.


$ black --version
black, version 18.6b3
$ black src/ --diff
--- src/fonduer/learning/__init__.py	2018-12-11 22:13:08.808439 +0000
+++ src/fonduer/learning/__init__.py	2019-03-22 16:27:11.950875 +0000
@@ -1,9 +1,9 @@
 from fonduer.learning.disc_models.logistic_regression import LogisticRegression
 from fonduer.learning.disc_models.lstm import LSTM
 from fonduer.learning.disc_models.sparse_logistic_regression import (
-    SparseLogisticRegression,
+    SparseLogisticRegression
 )
 from fonduer.learning.disc_models.sparse_lstm import SparseLSTM
 
 __all__ = ["LogisticRegression", "LSTM", "SparseLogisticRegression", "SparseLSTM"]
 
reformatted src/fonduer/learning/__init__.py
All done! ✨ 🍰 ✨
1 file reformatted, 89 files left unchanged.

To Reproduce
Steps to reproduce the behavior:

See above.

Expected behavior

A solution is either

  1. Reformat src/fonduer/learning/__init__.py
  2. Make sure black is 18.9b0+ by defining so in requirements-dev.txt

Error Logs/Screenshots
If applicable, add error logs or screenshots to help explain your problem.

See above.

Environment (please complete the following information):

  • OS: macOS (Mojave)
  • PostgreSQL Version: N/A
  • Poppler Utils Version: N/A
  • Fonduer Version: 138e4be

Additional context
Add any other context about the problem here.

@HiromuHota
Copy link
Contributor Author

The root cause is the inconsistent formatting between isort and black (18.6b3) (psf/black#250).
Since psf/black#504 (i.e., Black 18.9b0+), black became consistent with isort.
Therefore, we should make sure to use black 18.9b0+. Let me submit a PR.

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 a pull request may close this issue.

1 participant