pywin32 icon indicating copy to clipboard operation
pywin32 copied to clipboard

Pythonwin IDE fixes and extensions / Py3

Open kxrob opened this issue 4 years ago • 4 comments

kxrob avatar Sep 07 '21 22:09 kxrob

Could you please also add a summary of the changes to CHANGES.txt

mhammond avatar Sep 08 '21 05:09 mhammond

reformat with black

It should be principally possible to somehow transform and rebase a branch with several commits, using the formatter after each commit and doing appropriate rebase / diff+apply / filter-branch -es. Just how to do it best (semi-)auto? A quick search yielded those as potentially useful recipes so far: https://gmcgregor.ca/blog/2018-09-08-format-whole-git-branch/ https://blog.scottlogic.com/2019/03/04/retroactively-applying-prettier-to-existing-branches.html

How close are they to landing

May still require some sorting and cleaning. Much of that is from a pre-git accrued patch with a heap of quick hacks. I could pinch off parts as extra PRs ...

kxrob avatar Sep 08 '21 12:09 kxrob

It should be principally possible to somehow transform and rebase a branch with several commits, May still require some sorting and cleaning.

OK, thanks - in that case, and if it's OK with you, I think I'll charge ahead with the black formatting in the next day or 2, and we can do this at our leisure.

mhammond avatar Sep 09 '21 08:09 mhammond

somehow transform and rebase a branch with several commits, using the formatter after each commit and doing appropriate rebase

It turned out to run smooth like this:

git lint-history black --relevant-glob "*.py" --refs master..ide-ex3

git rebase master ide-ex3 --strategy-option=theirs

# lint branch again (merge produced some excess empty lines)
git lint-history black --relevant-glob "*.py" --refs master..ide-ex3

( Uses patched version of git-lint-history to allow and forward the --refs option to git-filter-repo )

kxrob avatar Sep 10 '21 13:09 kxrob