plugin-hub icon indicating copy to clipboard operation
plugin-hub copied to clipboard

Accustom mult to further dev usage

Open tainn opened this issue 3 years ago • 2 comments

Includes multiple changes towards the create_new_plugin root python script.

Consists of:

  • Adhering to the PEP-8 guidelines
  • Avoiding the shadowing of in-built keywords (str, dir)
  • Avoiding shadowing of global variables outside of the function's scope (strfun)
  • Replacing comparison with None being performed with equality operators; this change also increases performance
  • Preventing potential of undefined names (infi)

Overall, this change slightly improves performance and alleviates bad practices -- such as undesired overshadowing -- allowing for safer continuation should the script see further development.

tainn avatar Aug 15 '22 16:08 tainn

Includes non-plugin changes

An alternative which uses yapf formatting (matches https://github.com/runelite/runelite-wiki-scraper) and incorporates only the equality operator change is https://github.com/Nightfirecat/plugin-hub/commits/python-cleanup I don't have strong feelings on this either way

Nightfirecat avatar Aug 15 '22 17:08 Nightfirecat