From 07c76b0cbfeabc25af41356352c2e185d425395b Mon Sep 17 00:00:00 2001 From: David Read Date: Wed, 2 Dec 2015 16:23:54 +0000 Subject: [PATCH] Docs & pep8 --- ckanext/harvest/harvesters/base.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ckanext/harvest/harvesters/base.py b/ckanext/harvest/harvesters/base.py index 56d0fb2..354cbec 100644 --- a/ckanext/harvest/harvesters/base.py +++ b/ckanext/harvest/harvesters/base.py @@ -2,7 +2,7 @@ import logging import re import uuid -from sqlalchemy.sql import update,and_, bindparam +from sqlalchemy.sql import update, bindparam from pylons import config from ckan import plugins as p @@ -11,11 +11,11 @@ from ckan.model import Session, Package, PACKAGE_NAME_MAX_LENGTH from ckan.logic import ValidationError, NotFound, get_action from ckan.logic.schema import default_create_package_schema -from ckan.lib.navl.validators import ignore_missing,ignore -from ckan.lib.munge import munge_title_to_name,substitute_ascii_equivalents +from ckan.lib.navl.validators import ignore_missing, ignore +from ckan.lib.munge import munge_title_to_name, substitute_ascii_equivalents -from ckanext.harvest.model import HarvestJob, HarvestObject, HarvestGatherError, \ - HarvestObjectError +from ckanext.harvest.model import (HarvestObject, HarvestGatherError, + HarvestObjectError) from ckan.plugins.core import SingletonPlugin, implements from ckanext.harvest.interfaces import IHarvester @@ -32,7 +32,11 @@ def munge_tag(tag): class HarvesterBase(SingletonPlugin): ''' - Generic class for harvesters with helper functions + Generic base class for harvesters, providing a number of useful functions. + + A harvester doesn't have to derive from this - it could just have: + + implements(IHarvester) ''' implements(IHarvester)