mirror of https://github.com/tLDP/python-tldp
pep8/pyflakes
This commit is contained in:
parent
363bba8a37
commit
16885508da
|
@ -5,14 +5,13 @@ from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
from tldp.utils import max_mtime, mtime_gt
|
from tldp.utils import max_mtime, mtime_gt
|
||||||
|
|
||||||
from tldp.sources import SourceCollection
|
from tldp.sources import SourceCollection
|
||||||
from tldp.outputs import OutputCollection
|
from tldp.outputs import OutputCollection
|
||||||
|
|
||||||
from argparse import Namespace
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# -- any individual document (source or output) will have a status
|
# -- any individual document (source or output) will have a status
|
||||||
# from the following list of status_types
|
# from the following list of status_types
|
||||||
|
@ -99,7 +98,7 @@ class Inventory(object):
|
||||||
del o[doc]
|
del o[doc]
|
||||||
self.orphan[doc].status = 'orphan'
|
self.orphan[doc].status = 'orphan'
|
||||||
logger.debug("Identified %d orphan documents: %r.", len(self.orphan),
|
logger.debug("Identified %d orphan documents: %r.", len(self.orphan),
|
||||||
self.orphan.keys())
|
self.orphan.keys())
|
||||||
|
|
||||||
# -- unpublished ('new') identification
|
# -- unpublished ('new') identification
|
||||||
#
|
#
|
||||||
|
@ -109,7 +108,7 @@ class Inventory(object):
|
||||||
del s[doc]
|
del s[doc]
|
||||||
self.new[doc].status = 'new'
|
self.new[doc].status = 'new'
|
||||||
logger.debug("Identified %d new documents: %r.", len(self.new),
|
logger.debug("Identified %d new documents: %r.", len(self.new),
|
||||||
self.new.keys())
|
self.new.keys())
|
||||||
|
|
||||||
# -- published identification; source and output should be same size
|
# -- published identification; source and output should be same size
|
||||||
assert len(s) == len(o)
|
assert len(s) == len(o)
|
||||||
|
@ -135,7 +134,7 @@ class Inventory(object):
|
||||||
odoc.status = sdoc.status = 'stale'
|
odoc.status = sdoc.status = 'stale'
|
||||||
self.stale[stem] = sdoc
|
self.stale[stem] = sdoc
|
||||||
logger.debug("Identified %d stale documents: %r.", len(self.stale),
|
logger.debug("Identified %d stale documents: %r.", len(self.stale),
|
||||||
self.stale.keys())
|
self.stale.keys())
|
||||||
|
|
||||||
# -- stale identification
|
# -- stale identification
|
||||||
#
|
#
|
||||||
|
@ -145,7 +144,7 @@ class Inventory(object):
|
||||||
self.broken[stem] = sdoc
|
self.broken[stem] = sdoc
|
||||||
sdoc.status = sdoc.output.status = 'broken'
|
sdoc.status = sdoc.output.status = 'broken'
|
||||||
logger.debug("Identified %d broken documents: %r.", len(self.broken),
|
logger.debug("Identified %d broken documents: %r.", len(self.broken),
|
||||||
self.broken.keys())
|
self.broken.keys())
|
||||||
|
|
||||||
def getByStatusClass(self, status_class):
|
def getByStatusClass(self, status_class):
|
||||||
desired = status_classes.get(status_class, None)
|
desired = status_classes.get(status_class, None)
|
||||||
|
|
|
@ -7,13 +7,14 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import errno
|
import errno
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
from tldp.ldpcollection import LDPDocumentCollection
|
from tldp.ldpcollection import LDPDocumentCollection
|
||||||
|
|
||||||
from tldp.utils import statfiles, stem_and_ext
|
from tldp.utils import statfiles, stem_and_ext
|
||||||
from tldp.typeguesser import guess, knownextensions
|
from tldp.typeguesser import guess, knownextensions
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def scansourcedirs(dirnames):
|
def scansourcedirs(dirnames):
|
||||||
'''return a dict() of all SourceDocuments discovered in dirnames
|
'''return a dict() of all SourceDocuments discovered in dirnames
|
||||||
|
|
|
@ -6,12 +6,13 @@ from __future__ import absolute_import, division, print_function
|
||||||
import os
|
import os
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
from tldp.utils import makefh
|
from tldp.utils import makefh
|
||||||
|
|
||||||
import tldp.doctypes
|
import tldp.doctypes
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def getDoctypeMembers(membertype):
|
def getDoctypeMembers(membertype):
|
||||||
'''returns a list of tldp.doctypes; convenience function'''
|
'''returns a list of tldp.doctypes; convenience function'''
|
||||||
|
|
|
@ -5,7 +5,6 @@ from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import io
|
import io
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
import errno
|
import errno
|
||||||
import operator
|
import operator
|
||||||
|
|
Loading…
Reference in New Issue