More consistent config setting with post-FALLBACK_ERROR_FORMAT apply (#2310)

* Update unit testing and add more consistent config

* Change init and app values to private

* Cleanup line lengths
This commit is contained in:
Adam Hopkins
2021-11-16 13:07:33 +02:00
committed by GitHub
parent abeb8d0bc0
commit cde02b5936
7 changed files with 135 additions and 30 deletions

View File

@@ -918,7 +918,7 @@ class RouteMixin:
return route
def _determine_error_format(self, handler) -> str:
def _determine_error_format(self, handler) -> Optional[str]:
if not isinstance(handler, CompositionView):
try:
src = dedent(getsource(handler))
@@ -930,7 +930,7 @@ class RouteMixin:
except (OSError, TypeError):
...
return "auto"
return None
def _get_response_types(self, node):
types = set()