-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Common API Between Flask + Blueprint #3709
Conversation
|
Since def setupmethod(f):
@wraps(f)
def wrapped(self, *args, **kwargs):
if self._is_setup_finished():
raise AssertionError(...)
return f(*args, **kwargs)
return wrapper
class Skeleton:
def _is_setup_finished(self):
raise NotImplementedError
class Flask:
def _is_setup_finished(self):
return self.debug and self._got_first_request
class Blueprint:
def _is_setup_finished(self):
return self.warn_on_modifications and self._got_registered_once |
This does change the behavior a bit, since |
Regarding naming, a few of us in Discord liked the name |
2d1c9d5
to
73592bd
Compare
I saw the messages in the Discord about switching from |
6420775
to
bd96ab2
Compare
bd96ab2
to
2e2e1ed
Compare
Co-authored-by: Chris Nguyen <chrisngyn99@gmail.com>
2e2e1ed
to
b146a13
Compare
Moved a couple minor things into |
Resolves #3215