-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposals: Introduce a formatter #418
Comments
@cfarrow I recommend GHA setting will be follows.
Almost the only debatable setting value would be I looked at how some well-known projects set theirs up. Some of them are quite long, like I am considering not changing the set values from the defaults to avoid controversy. Any opinion would be appreciated. |
I tried it with my fork. Since |
GHA settings is improved. on:
pull_request:
branches: [drop_py2] # TODO: add master(main)
jobs:
formatter:
name: formatter
runs-on: windows-latest
strategy:
matrix:
python-version: [3.7]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install black
run: pip install black==22.12.0
- name: format
run: python -m black .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: apply code formatter change
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: ${{ github.head_ref }}
I have experimented with this. |
Please stop pinging me on everything. I specifically turn of email notifications except for mentions so that I can focus on issues that need my specific attention. |
Maybe it's nice, but it should be low priority as the project has not so many contributors to have a lot of benefit from it. So it's up to you to implement it or not. Doing such minor things in less number of PRs would be also better. |
I would like to introduce a formatter for codebases in statically defined modules.
I would like to be able to apply a formatter to PRed codebases by GitHub Actions.
I have wanted to introduce it, but was concerned that it would break the old Python syntax.
But on the
drop_py2
plan and its branch, that fear is removed.Keep in mind, I do not intend to apply this to modules under
comtypes.gen
that are dynamically generated.Because it would require third-party libraries for runtime dependencies, which goes against the "pure python" intent of this library.
codegenerator
process should be able to generate readable code.However, if the code generation process itself becomes more complicated because of this, I do not mind if the generated code is a little difficult to read.
The text was updated successfully, but these errors were encountered: