Closed roberto-arista closed 5 months ago
Black is a dependency for the "Format Code" menu under "Python". Unfortunately, the code base itself doesn't use it...
Is there any interest in settings it up?
It will be a huge commit. I’d be in favor but only if @typemytype is comfortable with it, too.
If there are any unmerged prs they should be merged first.
Are you suggesting to set up pre-commit?
the app requirements and package requirements could be separated.
black is only used inside the app.
add an app-requirements.txt
and install them here
https://github.com/typemytype/drawbot/blob/master/.github/workflows/build.yml#L51
app requirements could be: (out of my head...)
black
corefoundationasyncio
py2app
pygments
pip
Maybe take the opportunity to rename the req files with "requirements" at the front, so they naturally group together:
requirements.txt
requirements-rtd.txt
requirements-test.txt
(perhaps requirements-dev.txt
?)requirements-app.txt
?
Are you suggesting to set up pre-commit?
I generally store the black settings in a pyproject.toml file. If there's interest, we could write them somewhere that could be picked up by different code editors...
agree with the renaming of the requirements files
black is used here https://github.com/typemytype/drawbot/blob/dcd2eb4840be30f3f26cf54eead797fc5fde886a/drawBot/ui/drawBotController.py#L171-L178 to format the code inside the code editor, I guess no need for other settings, its not applied on the source code itself, but the code inside the codeeditor inside drawBot
.readthedocs.yaml
for read the docs --> https://blog.readthedocs.com/migrate-configuration-v2/Summarizing:
Conclusion:
The question remains:
Hey! I see black listed in the dependencies, but I cannot find the settings in the repo. Are you using it to format the code? I'd like to adhere to the repository customs : )