chispa icon indicating copy to clipboard operation
chispa copied to clipboard

Refactor code to conform to PEP8

Open calum-mcg opened this issue 2 years ago • 5 comments

Non-essential, would help to improve readability of code by ensuring the style conforms to PEP8 standards, including:

  • Indentation
  • Max line length
  • Naming conventions
  • Comments

calum-mcg avatar Aug 09 '23 08:08 calum-mcg

@MrPowers - happy to create a stab at this and put in a PR. Let me know if it would be useful

calum-mcg avatar Aug 09 '23 08:08 calum-mcg

@calum-mcg - yea, can you please open a PR. Here's my preferred setup:

  • black code formatting
  • CI checks to verify the code follows black (but doesn't actually modify the code)
  • Ruff linting

What do you think?

MrPowers avatar Aug 09 '23 13:08 MrPowers

@MrPowers - looks good, comments:

  • black code formatting

Yeah that works, it's PEP8 by default ✅

  • CI checks ..

Great idea. We could add a step for running black formatter in GH actions. Failing on an error.

  • Ruff linting

Do we need this if using Black Code Formatter? Not used it before

Once I have a PR up, may need some support on docstrings etc.

calum-mcg avatar Aug 09 '23 14:08 calum-mcg

Great. thank you!

MrPowers avatar Aug 09 '23 15:08 MrPowers

I am going to do my best to either merge or close the existing PRs. Once those are dealt with, we can format the code. I don't want to reformat the code just yet cause that could cause some difficult conflict resolution.

MrPowers avatar Sep 30 '23 01:09 MrPowers