Dust off the codebase. #8

Merged
radex merged 3 commits from q3k/dustoff into master 2024-07-08 12:10:24 +00:00
Owner

In preparation for upcoming changes, we do a bit of a spring cleanup:

  1. Make everything statically typechecked by mypy. Biggest issue was webapp/vcard.py which was horribly stringly-typed. It's not perhaps overly OOPy, but I hope in the future we'll find a good balance for this. Otherwise stuff is mostly unchanged.
  2. Move some stuff in/out of App, and actually properly subclass it.
  3. Move most of the stuff out of webapp/context.py into App. This file is now poorly named.
  4. Refactor webapp/admin.py to use vcard logic.
  5. Run black on everything.
  6. Update shell.nix, add a ci.sh to run mypy and black. Of course this is not tied into any CI yet.
In preparation for upcoming changes, we do a bit of a spring cleanup: 1. Make everything statically typechecked by mypy. Biggest issue was `webapp/vcard.py` which was horribly stringly-typed. It's not perhaps overly OOPy, but I hope in the future we'll find a good balance for this. Otherwise stuff is mostly unchanged. 2. Move some stuff in/out of App, and actually properly subclass it. 3. Move most of the stuff out of `webapp/context.py` into App. This file is now poorly named. 4. Refactor `webapp/admin.py` to use vcard logic. 5. Run [black](https://github.com/psf/black) on everything. 6. Update shell.nix, add a ci.sh to run mypy and black. Of course this is not tied into any CI yet.
q3k added 3 commits 2024-07-07 15:08:37 +00:00
q3k changed title from q3k/dustoff to Dust off the codebase. 2024-07-07 15:08:46 +00:00
q3k requested review from informatic 2024-07-07 15:12:00 +00:00
q3k force-pushed q3k/dustoff from 3f0cf00b1c to aaa4d49012 2024-07-07 19:38:49 +00:00 Compare
q3k force-pushed q3k/dustoff from aaa4d49012 to 1f51fbea85 2024-07-07 19:46:41 +00:00 Compare
q3k removed review request for informatic 2024-07-07 19:46:58 +00:00
q3k requested review from radex 2024-07-07 19:47:02 +00:00
radex approved these changes 2024-07-08 12:10:18 +00:00
@ -8,4 +13,3 @@
self.use_tls = use_tls
self.url = url
@lru.locked
Owner

out of curiosity: any particular reason why you got rid of the locked decorator? or just matter of taste/preference?

out of curiosity: any particular reason why you got rid of the `locked` decorator? or just matter of taste/preference?
radex merged commit 05cbc7163a into master 2024-07-08 12:10:24 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hswaw/ldapweb#8
No description provided.