Closed lionlai1989 closed 1 year ago
@gfacciol Could you please review this PR? Thank you.
Hi @lionlai1989, thanks for contributing!
Is there a way to configure black so that the code style stays closer to that of the original codebase? I think that in its current state this pull request is introducing too many style changes, which may obfuscate code history.
Hey @carlodef Thanks for replying. Here are some points I can think of for this PR.
'
to double quote "
really affects many lines of code. So, maybe keeping single quote is preferable?Thank you.
Description
Dear the team of s2p: First, this project is awesome. It's the photogrammetry project that is thorough and comprehensive to follow for everyone who want to enter this field. I propose that this project could follow the PEP 8 – Style Guide for Python Code to make it more friendly and easier to read. Therefore, I would like to introduce the open source python package black into this project. black is the uncompromising Python code formatter, which can help us to save time and mental energy for more important matters and be more efficient in writing code. Developers can contribute to this project in more uniform coding style.
Type of change
The changes of this PR are:
setup.py
. Developers can install thisblack
in development bypip install -e .[dev]
.s2p
,tests
, andutils
withblack
automatically without any manual operation. Thus, the logic of the program does not change at all. There are 41 Python files ins2p
,tests
,utils
andsetup.py
. 40 Python files have been formatted because/utils/__init__.py
is empty.How Has This Been Tested?
This project has been tested with the command,
pytest tests/
, and all tests pass.Checklist: