-
Notifications
You must be signed in to change notification settings - Fork 27
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 defaults for Black code formatting #103
Conversation
Codecov Report
@@ Coverage Diff @@
## main #103 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 182 182
Branches 33 33
=========================================
Hits 182 182 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I've actually been annoyed with the single quotes because my editor converts them to double quotes on save, this change will be very nice 😁
Btw, not critical, but it seems like black=22.10.0
(released 6 Oct 2022) can format Jupyter notebooks now. I just tried it and it formats the doc/demo.ipynb
file. Up to you if you want to do it here or in a separate PR (will need to update black
's version in .pre-commit-config.yaml
.
diff --git a/doc/demo.ipynb b/doc/demo.ipynb
index f26d916..5735d96 100644
--- a/doc/demo.ipynb
+++ b/doc/demo.ipynb
@@ -552,14 +552,16 @@
}
],
"source": [
- "store = fsspec.get_mapper('az://carbonplan-share/example_cmip6_data.zarr', account_name='carbonplan')\n",
+ "store = fsspec.get_mapper(\n",
+ " \"az://carbonplan-share/example_cmip6_data.zarr\", account_name=\"carbonplan\"\n",
+ ")\n",
"ds = xr.open_zarr(store, consolidated=True)\n",
"\n",
- "# the attributes contain a lot of useful information, but clutter the print out when we inspect the outputs \n",
- "# throughout this demo, clearing it to avoid confusion \n",
+ "# the attributes contain a lot of useful information, but clutter the print out when we inspect the outputs\n",
+ "# throughout this demo, clearing it to avoid confusion\n",
"ds.attrs = {}\n",
"\n",
- "# inspect the dataset \n",
+ "# inspect the dataset\n",
"display(ds)"
]
},
| Btw, not critical, but it seems like black=22.10.0 (released 6 Oct 2022) can format Jupyter notebooks now. I just tried it and it formats the doc/demo.ipynb file. Up to you if you want to do it here or in a separate PR (will need to update black's version in .pre-commit-config.yaml. Oh nice! I'll add it to this PR to keep it all together |
Description of proposed changes
Simplifies pre-commit and tool configuration, Fixes #102