r/Python 3d ago

Resource [ Removed by moderator ]

[removed] — view removed post

0 Upvotes

6 comments sorted by

View all comments

6

u/Golle 3d ago edited 3d ago

Writing as I go:

  • No type hints anywhere. It is completely random and arbitrary what a function expects and returns. Want to know what data pass into a function? You better go read that function's code and all other functions it may be calling. Yay.
  • Dictionaries used to access random keys as part of the program. Dicts dont tell you which keys are available. It should be a class instead. database_meta is a big offender.
  • No error handling. All code is all happy path everywhere. I guess a program error causing a crash is fine, atleast it fails fast and early. In the few cases where a try/except encounters an error, no information is provided about it. No logging, no pushing the error back up the function call chain. Instead you have the function return false instead of true. This makes debugging a nightmare.
  • No tests.
  • Global variables, mostly in server.py so that should be an easy fix.

-2

u/__sudvig__ 3d ago

Error handling is added as part of parser. Meta data is stored for both db and table so It should tell the data. Will add a good documentation to it