Use of the patch
decorator
#679
the-sean-c
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Would it be worth discussing the use (or maybe just overuse) of the patch decorator?
I can see that it might have uses in some cases, but I can't help but feel like it adds a disorganized dimension to some code that makes it harder to grok. For example, fasthtml/oauth.py:
creds
patched in at the bottom of the script. Why not just add it directly in the GoogleAppClient class?Particularly, it feels to me like patching classes that are defined within the same file just a few lines above might be overuse of a patch decorator.
Beta Was this translation helpful? Give feedback.
All reactions