LOLINTERNETZ / vscodeoffline

Enables Visual Studio Code's extension gallery to be used in offline (air-gapped) environments. Or, run your own gallery!
https://hub.docker.com/u/lolinternet
MIT License
95 stars 28 forks source link

Refactor `vscodeoffline/vsc.py` #42

Closed Precioussheep closed 1 year ago

Precioussheep commented 1 year ago

Included is a handful of small refactors to help:

  1. reduce the amount of superfluous code within the package;
  2. enable the MagicJsonDecoder to handle classes with __slots__ enabled (slots described); and
  3. include typing in the package were possible

This work is part of a larger effort of mine to update the codebase to include typing, fix some lingering bugs and reduce duplicate code styles (ie: use of dataclasses vs dictionaries for version definitions in sync.py). These rather large changes are been tracked here, although it doesn't seem very fair to dump that all in a single pull request!

Also noting this has been formatted with black (line length 119). Happy to adjust.