Closed kurt-rhee closed 3 months ago
@pvlib/pvlib-maintainer we haven't adopted black
as the formatter. When PRs use black
to fix lint errors, it appears that black
also reformats lines that the submitter doesn't change. Are we OK with this? I think it's a minor concern, unless, clutter in the blame history is not a minor concern.
@pvlib/pvlib-maintainer we haven't adopted
black
as the formatter. When PRs useblack
to fix lint errors, it appears thatblack
also reformats lines that the submitter doesn't change. Are we OK with this? I think it's a minor concern, unless, clutter in the blame history is not a minor concern.
My concern is mainly that it makes reviewing more difficult. If we want to apply black then we should do the whole package in one go. I'm -1 on individual PRs doing it.
Given that @kurt-rhee is a big fan of VSCode and Rust, I'm assuming he is using ruff
, right? For context, it is a Python linter and formatter written in Rust. And it has a plugin for VSCode.
Kurt, in case you didn't know, you can format only some selected lines by selecting them and right-clicking, then click on Format Selection
This is the real behind-the-scenes of pretty much all my PRs
@echedey-ls I was using black just to be lazy and not format the flake8 line lengths manually. I'll try out Ruff next, the format selection feature looks really nice!
New PR here without any autoformatting: https://github.com/pvlib/pvlib-python/pull/2146
docs/sphinx/source/reference
for API changes.docs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).remote-data
) and Milestone are assigned to the Pull Request and linked Issue.