functions shouldn't be named like classes

This commit is contained in:
meejah 2020-02-28 11:46:19 -07:00
parent 8f35f78194
commit bc2f5f8e88
1 changed files with 6 additions and 6 deletions

View File

@ -230,13 +230,13 @@ class DirectoryNodeHandler(ReplaceMeMixin, Resource, object):
) )
if t == "json": if t == "json":
return DirectoryJSONMetadata(req, self.node) return _directory_json_metadata(req, self.node)
if t == "info": if t == "info":
return MoreInfo(self.node) return MoreInfo(self.node)
if t == "uri": if t == "uri":
return DirectoryURI(req, self.node) return _directory_uri(req, self.node)
if t == "readonly-uri": if t == "readonly-uri":
return DirectoryReadonlyURI(req, self.node) return _directory_readonly_uri(req, self.node)
if t == 'rename-form': if t == 'rename-form':
return renderElement( return renderElement(
req, req,
@ -994,7 +994,7 @@ class DirectoryAsHTML(Element):
def results(self, req, tag): def results(self, req, tag):
return get_arg(req, "results", "") return get_arg(req, "results", "")
def DirectoryJSONMetadata(req, dirnode): def _directory_json_metadata(req, dirnode):
d = dirnode.list() d = dirnode.list()
def _got(children): def _got(children):
kids = {} kids = {}
@ -1046,10 +1046,10 @@ def DirectoryJSONMetadata(req, dirnode):
return d return d
def DirectoryURI(req, dirnode): def _directory_uri(req, dirnode):
return text_plain(dirnode.get_uri(), req) return text_plain(dirnode.get_uri(), req)
def DirectoryReadonlyURI(req, dirnode): def _directory_readonly_uri(req, dirnode):
return text_plain(dirnode.get_readonly_uri(), req) return text_plain(dirnode.get_readonly_uri(), req)
class RenameForm(Element, object): class RenameForm(Element, object):