Hey folks, I’m looking into contributing to the La...
# dev
s
Hey folks, I’m looking into contributing to the LakeFS high-level SDK. I can't seem to find any pre-commit hooks, are there any formatting guidelines or tools used in the Python client libraries? (Existing code formatting looks like pep8/autopep8)
o
Should be documented, I agree! I believe we use pylint to validate formatting, there's a
clients/python-wrapper/lakefs/.pylintrc
file as well as
clients/python-wrapper/tests/.pylintrc
file for the tests - along with a
clients/python-wrapper/pylint.sh
script that checks both.
s
pylint is a linter. It does have a limited checks for formatting issues (line-length, trailing whitespaces, etc). But it's not an auto-formatter and cannot enforce an opinionated style like
autopep8
,
black
,
ruff format
, etc.
o
I don’t think we currently have an auto formatter for Python (nor a manual style guide tbh). Perhaps @Niro knows better
n
We do use pep8, but we don't enforce it (we should add it) The check should be done as part of the
pylint.sh
script
👍 2
s
If you're open to formatting changes, I highly recommend switching to Ruff for both formatting and linting instead of using Pylint.