fastapi-jwt-auth
fastapi-jwt-auth copied to clipboard
AuthConfig.load_config decorator decision
Hello, i was looking at Basic Usage example, and saw, that AuthJWT uses inherited from AuthConfig decorator to set it's static variables. However, this decorator does not return anything, so it "eat's up" decorated function.
I'm not a very experienced Python user, so i haven't even tought of such decorator usage (and i don't know how to google examples of that usage properly, other than "python using decorator without return"). I was wondering if someone can explain, why config is loaded that way and not, for example, using a method that just takes settings instance as an argument, and why decorator doesn't return that function back. What are advantages and purpose of that method?
Thanks in advance.