mirror of
https://github.com/pypiserver/pypiserver
synced 2024-11-09 16:45:51 +01:00
Use triple-quoted docstrings
This commit is contained in:
parent
676e86d683
commit
711deb51b7
@ -34,7 +34,7 @@ app = Bottle()
|
|||||||
|
|
||||||
|
|
||||||
class auth(object):
|
class auth(object):
|
||||||
"decorator to apply authentication if specified for the decorated method & action"
|
"""decorator to apply authentication if specified for the decorated method & action"""
|
||||||
|
|
||||||
def __init__(self, action):
|
def __init__(self, action):
|
||||||
self.action = action
|
self.action = action
|
||||||
|
@ -9,20 +9,20 @@ from watchdog.observers import Observer
|
|||||||
import threading
|
import threading
|
||||||
|
|
||||||
class CacheManager(object):
|
class CacheManager(object):
|
||||||
'''
|
"""
|
||||||
A naive cache implementation for listdir and digest_file
|
A naive cache implementation for listdir and digest_file
|
||||||
|
|
||||||
The listdir_cache is just a giant list of PkgFile objects, and
|
The listdir_cache is just a giant list of PkgFile objects, and
|
||||||
for simplicity it is invalidated anytime a modification occurs
|
for simplicity it is invalidated anytime a modification occurs
|
||||||
within the directory it represents. If we were smarter about
|
within the directory it represents. If we were smarter about
|
||||||
the way that the listdir data structure were created/stored,
|
the way that the listdir data structure were created/stored,
|
||||||
then we could do more granular invalidation. In practice, this
|
then we could do more granular invalidation. In practice, this
|
||||||
is good enough for now.
|
is good enough for now.
|
||||||
|
|
||||||
The digest_cache exists on a per-file basis, because computing
|
The digest_cache exists on a per-file basis, because computing
|
||||||
hashes on large files can get expensive, and it's very easy to
|
hashes on large files can get expensive, and it's very easy to
|
||||||
invalidate specific filenames.
|
invalidate specific filenames.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ class _EventHandler(object):
|
|||||||
self.root = root
|
self.root = root
|
||||||
|
|
||||||
def dispatch(self, event):
|
def dispatch(self, event):
|
||||||
'''Called by watchdog observer'''
|
"""Called by watchdog observer"""
|
||||||
cache = self.cache
|
cache = self.cache
|
||||||
|
|
||||||
# Don't care about directory events
|
# Don't care about directory events
|
||||||
|
Loading…
Reference in New Issue
Block a user