audeering / audbackend

Manage file storage on different backends
https://audeering.github.io/audbackend/
Other
3 stars 0 forks source link

Use ruff formatter as pre-commit #193

Closed hagenw closed 6 months ago

hagenw commented 6 months ago

As ruff now supports formatting of code like black, we extend pre-commit to also format the code automatically using ruff.

The biggest changes with the autoformatted code are:

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.0%. Comparing base (9a9bbc4) to head (d99b9fd).

Additional details and impacted files | [Files](https://app.codecov.io/gh/audeering/audbackend/pull/193?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering) | Coverage Δ | | |---|---|---| | [audbackend/\_\_init\_\_.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9fX2luaXRfXy5weQ==) | `100.0% <ø> (ø)` | | | [audbackend/core/api.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2FwaS5weQ==) | `100.0% <100.0%> (ø)` | | | [audbackend/core/backend/artifactory.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2JhY2tlbmQvYXJ0aWZhY3RvcnkucHk=) | `100.0% <100.0%> (ø)` | | | [audbackend/core/backend/base.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2JhY2tlbmQvYmFzZS5weQ==) | `100.0% <100.0%> (ø)` | | | [audbackend/core/backend/filesystem.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2JhY2tlbmQvZmlsZXN5c3RlbS5weQ==) | `100.0% <100.0%> (ø)` | | | [audbackend/core/conftest.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2NvbmZ0ZXN0LnB5) | `100.0% <100.0%> (ø)` | | | [audbackend/core/errors.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2Vycm9ycy5weQ==) | `100.0% <ø> (ø)` | | | [audbackend/core/interface/base.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2ludGVyZmFjZS9iYXNlLnB5) | `100.0% <100.0%> (ø)` | | | [audbackend/core/interface/unversioned.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2ludGVyZmFjZS91bnZlcnNpb25lZC5weQ==) | `100.0% <ø> (ø)` | | | [audbackend/core/interface/versioned.py](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2ludGVyZmFjZS92ZXJzaW9uZWQucHk=) | `100.0% <100.0%> (ø)` | | | ... and [2 more](https://app.codecov.io/gh/audeering/audbackend/pull/193?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering) | |
frankenjoe commented 6 months ago
  • we now use " instead of '

I personally prefer ' as it makes the code easier to read. But I suppose this is now standard with black, so we don't want to mess around with it.

hagenw commented 6 months ago

Yes, we decided in the end to just go with the defaults.