ansible_modules icon indicating copy to clipboard operation
ansible_modules copied to clipboard

draft: Linting Updates

Open ryanmerolle opened this issue 2 years ago • 4 comments

Related Issue

New Behavior

  • Add linter (black, isort, ruff) settings to project.toml
  • Enable additional github action workflows for linting
  • auto-fixed isort, json (pretty format), black, ruff, yamllint, end of file new line, trailing spaces removal
  • Added pre-commit config
  • Added invoke workflow to call common tasks (linter focused for now, more coming)
  • Add explicitly encoding where missed in python open

Contrast to Current Behavior

Minimal linting & convenience functionality for local development.

Discussion: Benefits and Drawbacks

Changes to the Documentation

Doc updates with regards to contributing forthcoming

Proposed Release Note Entry

TBD

...

Double Check

  • [X] I have read the comments and followed the CONTRIBUTING.md.
  • [X] I have explained my PR according to the information in the comments or in a linked issue.
  • [X] My PR targets the devel branch.

ryanmerolle avatar May 11 '23 15:05 ryanmerolle

I'll update docs after I get feedback for this draft

ryanmerolle avatar May 11 '23 15:05 ryanmerolle

I'll look into tests shortly, just rather get feedback on the approach.

ryanmerolle avatar May 11 '23 18:05 ryanmerolle

That’s 100% fair. The point of it is so that longer term people use the same format rules and so you do not get diffs due to personal style. Frankly, we never started with black from the start, so I’d be fine to drop it while applying the other linting.

ryanmerolle avatar May 16 '23 17:05 ryanmerolle

It's fine. I just felt obligated to complain about it, but I agree with the changes

sc68cal avatar May 17 '23 15:05 sc68cal