Changeset 3153 in products


Ignore:
Timestamp:
Apr 20, 2011 8:58:26 AM (10 years ago)
Author:
vmaksymiv
Message:

pyflakes fixes

Location:
quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/Extensions/Install.py

    r3151 r3153  
    11import logging 
    22from Products.CMFCore.utils import getToolByName 
    3 from Products.GenericSetup.upgrade import _upgrade_registry 
    43 
    54from quintagroup.dropdownmenu import PROJECT_NAME 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/controlpanel.py

    r3151 r3153  
    1919        """To save a few fields into portal_properties tool""" 
    2020        result = super(DropDownMenuSettingsEditForm, self).applyChanges(data) 
    21         dummy = self._settings(data['show_content_tabs'], 
    22                                data['show_nonfolderish_tabs']) 
     21        self._settings(data['show_content_tabs'], 
     22                       data['show_nonfolderish_tabs']) 
    2323        return result 
    2424 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/menu.py

    r3151 r3153  
    11# -*- coding: utf-8 -*- 
    22from zope.interface import implements 
    3 from zope.component import getUtility 
    43 
    54from Products.CMFPlone.browser.navtree import SitemapQueryBuilder 
     
    98from plone.app.layout.navigation.interfaces import INavigationQueryBuilder 
    109 
    11 from quintagroup.dropdownmenu.interfaces import IDropDownMenuSettings 
    1210from quintagroup.dropdownmenu.util import getDropDownMenuSettings 
    1311 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/viewlets.py

    r3151 r3153  
    22from Acquisition import aq_inner 
    33 
    4 from zope.component import getMultiAdapter, getUtility 
     4from zope.component import getMultiAdapter 
    55 
    66from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile 
     
    1414from plone.app.layout.navigation.navtree import buildFolderTree 
    1515from plone.app.layout.navigation.interfaces import INavtreeStrategy 
    16 from plone.app.layout.navigation.interfaces import INavigationQueryBuilder 
    17  
    18 from quintagroup.dropdownmenu.interfaces import IDropDownMenuSettings 
     16 
    1917from quintagroup.dropdownmenu.browser.menu import DropDownMenuQueryBuilder 
    2018from quintagroup.dropdownmenu.util import getDropDownMenuSettings 
     
    7068        conf = self.conf 
    7169        tool = self.tool 
    72         context = aq_inner(self.context) 
    7370 
    7471        # check if we have required root actions category inside tool 
     
    167164                     check_permissions=1, check_condition=1, max=-1): 
    168165        """Return action infos for a given category""" 
    169         context = aq_inner(self.context) 
    170166        ec = self.tool._getExprContext(object) 
    171167        actions = [ActionInfo(action, ec) for action in category.objectValues() 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/setuphandlers.py

    r3151 r3153  
    1 import sys 
    21import logging 
    32from zope.component import queryUtility 
    4 from zope.component import getSiteManager 
    5 from zope.component import getGlobalSiteManager 
    63from plone.registry.interfaces import IRegistry 
    7 from plone.browserlayer.utils import unregister_layer 
    8 from plone.browserlayer.interfaces import ILocalBrowserLayerType 
    94 
    10 from Acquisition import aq_parent 
    115from Products.CMFCore.utils import getToolByName 
    126 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/tests/base.py

    r3151 r3153  
    1010from collective.testcaselayer.ptc import BasePTCLayer, ptc_layer 
    1111 
    12 from Products.CMFCore.utils import getToolByName 
    1312 
    1413from quintagroup.dropdownmenu import PROJECT_NAME 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/tests/test_controlpanel.py

    r3151 r3153  
    33from plone.registry import Registry 
    44 
    5 from base import * 
     5from base import TestCase 
     6from base import IPREFIX 
    67 
     8from Products.CMFCore.utils import getToolByName 
    79from quintagroup.dropdownmenu.interfaces import IDropDownMenuSettings 
    810 
     
    2426    def test_show_icons(self): 
    2527        # Check show_icons record 
    26         show_icons = self.registry.records[IPREFIX + 'show_icons'] 
     28        self.registry.records[IPREFIX + 'show_icons'] 
    2729 
    2830        self.failUnless('show_icons' in IDropDownMenuSettings) 
     
    3133    def test_show_content_tabs(self): 
    3234        # Check show_content_tabs record 
    33         show_content_tabs = self.registry.records[ 
    34              IPREFIX + 'show_content_tabs'] 
     35        self.registry.records[IPREFIX + 'show_content_tabs'] 
    3536 
    3637        self.failUnless('show_content_tabs' in IDropDownMenuSettings) 
     
    3940    def test_show_nonfolderish_tabs(self): 
    4041        # Check show_nonfolderish_tabs record 
    41         show_nonfolderish_tabs = self.registry.records[ 
    42             IPREFIX + 'show_nonfolderish_tabs'] 
     42        self.registry.records[IPREFIX + 'show_nonfolderish_tabs'] 
    4343 
    4444        self.failUnless('show_nonfolderish_tabs' in IDropDownMenuSettings) 
     
    4848    def test_content_before_actions_tabs(self): 
    4949        # Check content_before_actions_tabs record 
    50         content_before_actions_tabs = self.registry.records[ 
    51             IPREFIX + 'content_before_actions_tabs'] 
     50        self.registry.records[IPREFIX + 'content_before_actions_tabs'] 
    5251 
    5352        self.failUnless('content_before_actions_tabs' in IDropDownMenuSettings) 
     
    5756    def test_content_tabs_level(self): 
    5857        # Check content_tabs_level record 
    59         content_tabs_level = self.registry.records[ 
    60             IPREFIX + 'content_tabs_level'] 
     58        self.registry.records[IPREFIX + 'content_tabs_level'] 
    6159 
    6260        self.failUnless('content_tabs_level' in IDropDownMenuSettings) 
     
    6563    def test_show_actions_tabs(self): 
    6664        # Check show_actions_tabs record 
    67         show_actions_tabs = self.registry.records[ 
    68             IPREFIX + 'show_actions_tabs'] 
     65        self.registry.records[IPREFIX + 'show_actions_tabs'] 
    6966 
    7067        self.failUnless('show_actions_tabs' in IDropDownMenuSettings) 
     
    7370    def test_actions_tabs_level(self): 
    7471        # Check actions_tabs_level record 
    75         actions_tabs_level = self.registry.records[ 
    76             IPREFIX + 'actions_tabs_level'] 
     72        self.registry.records[IPREFIX + 'actions_tabs_level'] 
    7773 
    7874        self.failUnless('actions_tabs_level' in IDropDownMenuSettings) 
     
    8177    def test_actions_category(self): 
    8278        # Check actions_category record 
    83         actions_category = self.registry.records[IPREFIX + 'actions_category'] 
     79        self.registry.records[IPREFIX + 'actions_category'] 
    8480 
    8581        self.failUnless('actions_category' in IDropDownMenuSettings) 
     
    8985    def test_nested_category_prefix(self): 
    9086        # Check nested_category_prefix record 
    91         nested_category_prefix = self.registry.records[ 
    92             IPREFIX + 'nested_category_prefix'] 
     87        self.registry.records[IPREFIX + 'nested_category_prefix'] 
    9388 
    9489        self.failUnless('nested_category_prefix' in IDropDownMenuSettings) 
     
    9893    def test_nested_category_sufix(self): 
    9994        # Check nested_category_sufix record 
    100         nested_category_sufix = self.registry.records[ 
    101             IPREFIX + 'nested_category_sufix'] 
     95        self.registry.records[IPREFIX + 'nested_category_sufix'] 
    10296 
    10397        self.failUnless('nested_category_sufix' in IDropDownMenuSettings) 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/tests/test_docs.py

    r3151 r3153  
    44#from zope.testing import doctestunit 
    55#from zope.component import testing 
    6 from base import TestCase, ztc 
    76 
    87 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/tests/test_installation.py

    r3151 r3153  
    22# Test product's installation 
    33# 
    4 import string 
    54from zope.component import queryUtility 
    6 from zope.component import queryMultiAdapter 
    7 from zope.viewlet.interfaces import IViewletManager 
    85from plone.registry.interfaces import IRegistry 
    96from plone.browserlayer import utils as blutils 
    107 
    11 from base import * 
     8from Products.CMFCore.utils import getToolByName 
     9 
     10from quintagroup.dropdownmenu.tests.base import TestCase, TestCaseUnInstalled 
     11from quintagroup.dropdownmenu.tests.base import IPREFIX 
     12 
     13from quintagroup.dropdownmenu import PROJECT_NAME 
     14from quintagroup.dropdownmenu.interfaces import IDropDownMenuLayer 
     15 
    1216CSS_RESOURCES = ["++resource++drop_down.css", ] 
    1317DEPENDENCIES = ["plone.app.registry", ] 
Note: See TracChangeset for help on using the changeset viewer.