migros / fotoobo

The mighty Fortinet toolbox
https://fotoobo.readthedocs.io/
GNU Lesser General Public License v3.0
17 stars 2 forks source link

♻️ Optimize syntax and beautify the code #186

Closed patrikspiess closed 8 months ago

patrikspiess commented 9 months ago
patrikspiess commented 9 months ago

Very good an thorough cleanup of the code!!

For better legibility I propose to also change the following:

  • Every Python keyword that results in a following block (if, for, with, ...) should be prepended with a blank line, except

    • If the line before is a line comment describing the condition or block
    • If the preceding line is solely for defining a variable that gets used/filled in the block

I would apply the same rules for return statements.

I pointed out quite a lot of spots that had a direct change, I saw there are more places in the code which would need cleanup based on my proposal.

If you agree with this proposal please update the pull request again, otherwise I will look again at the pull request and approve it.

Thank you. I went over all the files and added/removed blank lines as by your suggestion.