@@ -20,8 +20,9 @@ checklist are addressed in your PR.
2020
2121** PR checklist**
2222
23- * Format code using [ black] ( https://black.readthedocs.io/ ) with default settings.
24- Check also section [ code style] ( #code-style ) below.
23+ * Format and check code using [ ruff] ( https://docs.astral.sh/ruff/ ) with
24+ default settings: ` ruff format ` and ` ruff check ` . See also section
25+ [ code style] ( #code-style ) below.
2526* Your change shall not break existing unit tests.
2627 ` pytest ` must run without errors.
2728* Add unit tests for any new code not yet covered by tests.
@@ -33,16 +34,18 @@ checklist are addressed in your PR.
3334
3435## Code style
3536
36- The XRLint code complies to [ PEP-8 ] ( https://pep8.org/ ) except for a line
37- length of 88 characters as recommended by [ black] ( https://black.readthedocs.io/ ) .
38- Since black is un-opinionated regarding the order of imports,
39- we use the following three import blocks separated by an empty
40- line:
37+ The code style of XRLint equals the default settings
38+ of [ black] ( https://black.readthedocs.io/ ) . Since black is
39+ un-opinionated regarding the order of imports, we group and
40+ sort imports statements according to the default settings of
41+ [ isort ] ( https://pycqa.github.io/isort/ ) which boils down to
4142
43+ 0 . Future imports
42441 . Python standard library imports, e.g., ` os ` , ` typing ` , etc
43452 . 3rd-party imports, e.g., ` xarray ` , ` zarr ` , etc
44- 3 . XRLint module imports:
45- Prefer absolute import paths: ` from xrlint.a.b.c import d ` .
46+ 3 . 1st-party XRLint module imports using absolute paths,
47+ e.g., ` from xrlint.a.b.c import d ` .
48+ 4 . 1st-party XRLint module imports from local modules:
4649 Relative imports such as ` from .c import d ` are ok
4750 while ` ..c import d ` are not ok.
4851
0 commit comments