splunk / splunk-sdk-python

Splunk Software Development Kit for Python
http://dev.splunk.com
Apache License 2.0
687 stars 369 forks source link

style: format all code using black tool #420

Closed ghost closed 1 year ago

ghost commented 2 years ago

This PR introduces pre-commit (https://pre-commit.com/) and applies black changes to all the codebase, except examples folder.

All GDI-related repositories (https://github.com/splunk/addonfactory-ucc-generator, https://github.com/splunk/addonfactory-solutions-library-python etc) are already using pre-commit and at least black.

In the next PR we can add pre-commit to the CI to check all the PRs (like, https://github.com/splunk/addonfactory-ucc-generator/blob/067c3b82c7c318687be15a4ea768f396a9755884/.github/workflows/build-test-release.yml#L131-L141).

fantavlik commented 2 years ago

Thanks @arys-splunk! This looks good, we are currently working our way through open PRs in this repo and would like to get those addressed first before merging this to reduce merge conflicts as much as possible.

ghost commented 2 years ago

Thanks @arys-splunk! This looks good, we are currently working our way through open PRs in this repo and would like to get those addressed first before merging this to reduce merge conflicts as much as possible.

Yes, of course, I can then regenerate this PR, it is basically one line command.