Changeset 12681


Ignore:
Timestamp:
7 Mar 2015, 03:16:22 (12 years ago)
Author:
uli
Message:

pep8, pyflakes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/contracts.py

    r12663 r12681  
    1919Customer contract components.
    2020"""
    21 import os
    2221import grok
    23 from zope.component import queryUtility, getUtility
     22from zope.component import getUtility
    2423from zope.component.interfaces import IFactory
    2524from zope.interface import implementedBy
    … …  
    2827from waeup.ikoba.interfaces import MessageFactory as _
    2928from waeup.ikoba.interfaces import (
    30     IIkobaUtils, IObjectHistory,
    31     VERIFIED, APPROVED, PROVISIONALLY,
    32     IIDSource)
     29    IObjectHistory, VERIFIED, APPROVED, PROVISIONALLY, IIDSource)
    3330from waeup.ikoba.customers.interfaces import (
    34     IContractsContainer, ICustomerNavigation,
    35     IContract, IContractSelectProduct, ICustomersUtils,
    36     ISampleContract, ISampleContractProcess, ISampleContractEdit,
    37     ISampleContractOfficialUse)
    38 from waeup.ikoba.customers.utils import generate_contract_id
     31    IContractsContainer, ICustomerNavigation, IContract,
     32    IContractSelectProduct, ICustomersUtils, ISampleContract,
     33    ISampleContractProcess, ISampleContractEdit, ISampleContractOfficialUse)
    3934from waeup.ikoba.utils.helpers import attrs_to_fields
     35
    4036
    4137class ContractsContainer(grok.Container):
    … …  
    6157ContractsContainer = attrs_to_fields(ContractsContainer)
    6258
     59
    6360class ContractBase(grok.Container):
    6461    """This is a customer contract baseclass.
    6562    """
    66     grok.implements(IContractSelectProduct)  # Necesary for the selectproduct page
    67 
     63    grok.implements(IContractSelectProduct)  # Neccessary for the
     64                                             # selectproduct page (why?)
    6865    grok.baseclass()
    6966
    … …  
    150147                state = getattr(obj, 'state', None)
    151148                if state and state != VERIFIED:
    152                     return False, _("Attached documents must be verified first.")
     149                    return False, _(
     150                        "Attached documents must be verified first.")
    153151        return True, None
    154152
    … …  
    177175
    178176    grok.implements(
    179         ISampleContractProcess, # must come before ISampleContract
     177        ISampleContractProcess,  # must come before ISampleContract
    180178        ISampleContract,
    181179        ISampleContractEdit,
    … …  
    210208        return implementedBy(SampleContract)
    211209
     210
    212211@grok.subscribe(IContract, grok.IObjectAddedEvent)
    213212def handle_contract_added(contract, event):
Note: See TracChangeset for help on using the changeset viewer.