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

Use default configuration for code formatting with black #102

Closed
maxrjones opened this issue Oct 6, 2022 · 0 comments · Fixed by #103
Closed

Use default configuration for code formatting with black #102

maxrjones opened this issue Oct 6, 2022 · 0 comments · Fixed by #103
Labels
maintenance Maintenance tasks question Further information is requested

Comments

@maxrjones
Copy link
Member

What is your issue?

As pointed out in #100 (comment), xbatcher currently uses a non-standard Black configuration with influences the configuration choices for other tools. I propose we switch to the default configuration now, given that the library is still small and only one release has been made.

This is the diff for changing to the default configuration:

xbatcher max$ git diff --stat
 .pre-commit-config.yaml               |   1 -
 asv_bench/benchmarks/benchmarks.py    |  54 +++++++++++++++-----------------
 doc/conf.py                           | 106 ++++++++++++++++++++++++++++++-------------------------------
 setup.py                              |   2 +-
 xbatcher/__init__.py                  |   2 +-
 xbatcher/accessors.py                 |  10 +++---
 xbatcher/generators.py                |  32 +++++++++----------
 xbatcher/loaders/torch.py             |  10 +++---
 xbatcher/tests/test_accessors.py      |  40 +++++++++++------------
 xbatcher/tests/test_generators.py     | 148 ++++++++++++++++++++++++++++++++++++++++----------------------------------------------
 xbatcher/tests/test_keras_loaders.py  |  26 +++++++--------
 xbatcher/tests/test_print_versions.py |   2 +-
 xbatcher/tests/test_torch_loaders.py  |  48 +++++++++++++---------------
 xbatcher/util/print_versions.py       |  38 +++++++++++-----------
 14 files changed, 246 insertions(+), 273 deletions(-)

Almost all of this is due to the removal of --skip-string-normalization, which is described in the docs as for If you are adopting Black in a large project with pre-existing string conventions. IMO xbatcher would be better off using defaults since it's not yet a large project.

@maxrjones maxrjones added maintenance Maintenance tasks question Further information is requested labels Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance tasks question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant