Declare MultiFormatResource.formatDefault as optional string for subclass overrides.

This commit is contained in:
Jason R. Coombs 2020-11-29 15:19:11 -05:00
parent 8b991d3516
commit 6ea9003436

View File

@ -4,6 +4,11 @@ Common utilities that are available from Python 3.
Can eventually be merged back into allmydata.web.common.
"""
try:
from typing import Optional
except ImportError:
pass
from twisted.web import resource, http
from allmydata.util import abbreviate
@ -47,7 +52,7 @@ class MultiFormatResource(resource.Resource, object):
format if nothing else is given as the ``formatDefault``.
"""
formatArgument = "t"
formatDefault = None
formatDefault = None # type: Optional[str]
def render(self, req):
"""