From e2da599389bef2878ae83b4b1a318926fe97edf9 Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Sun, 22 Jun 2008 21:59:56 +0800 Subject: [PATCH] Add __all__ in ibus source files to limit the exported objects. --- ibus/attribute.py | 14 ++++++++++++++ ibus/common.py | 13 +++++++++++++ ibus/exception.py | 2 ++ ibus/gtk.py | 4 ++++ ibus/interface/iengine.py | 2 ++ ibus/interface/ienginefactory.py | 2 ++ ibus/interface/iibus.py | 2 ++ ibus/interface/ipanel.py | 2 ++ ibus/lookuptable.py | 5 +++++ ibus/object.py | 4 ++++ ibus/panel.py | 7 +++++++ ibus/property.py | 14 ++++++++++++++ 12 files changed, 71 insertions(+) diff --git a/ibus/attribute.py b/ibus/attribute.py index 2b8ba0c..fad9abe 100644 --- a/ibus/attribute.py +++ b/ibus/attribute.py @@ -19,6 +19,20 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ( + "ATTR_TYPE_UNDERLINE", + "ATTR_TYPE_FOREGROUND", + "ATTR_TYPE_BACKGROUND", + "Attribute", + "AttributeUnderline", + "AttributeForeground", + "AttributeBackground", + "AttrList", + "attribute_from_dbus_value", + "attr_list_from_dbus_value", + "ARGB", "RGB" + ) + import dbus ATTR_TYPE_UNDERLINE = 1 diff --git a/ibus/common.py b/ibus/common.py index 1938d27..f3cf391 100644 --- a/ibus/common.py +++ b/ibus/common.py @@ -19,6 +19,19 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ( + "IBUS_ADDR", + "IBUS_IFACE", + "IBUS_PATH", + "IBUS_NAME", + "IBUS_PANEL_IFACE", + "IBUS_ENGINE_FACTORY_IFACE", + "IBUS_ENGINE_IFACE", + "default_reply_handler", + "default_error_handler", + "DEFAULT_ASYNC_HANDLERS" + ) + import os import sys import getpass diff --git a/ibus/exception.py b/ibus/exception.py index 63072c9..83deb7a 100644 --- a/ibus/exception.py +++ b/ibus/exception.py @@ -19,5 +19,7 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ("IBusException", ) + class IBusException (Exception): pass diff --git a/ibus/gtk.py b/ibus/gtk.py index 9ef4494..8742767 100644 --- a/ibus/gtk.py +++ b/ibus/gtk.py @@ -19,6 +19,10 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ( + "PangoAttrList", + ) + import pango import ibus diff --git a/ibus/interface/iengine.py b/ibus/interface/iengine.py index 1a585fa..c49d361 100644 --- a/ibus/interface/iengine.py +++ b/ibus/interface/iengine.py @@ -19,6 +19,8 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ("IEngine", ) + import dbus.service from ibus.common import \ IBUS_ENGINE_IFACE diff --git a/ibus/interface/ienginefactory.py b/ibus/interface/ienginefactory.py index 52436c8..dcc23f7 100644 --- a/ibus/interface/ienginefactory.py +++ b/ibus/interface/ienginefactory.py @@ -19,6 +19,8 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ("IEngineFactory", ) + import dbus.service from ibus.common import \ IBUS_ENGINE_FACTORY_IFACE diff --git a/ibus/interface/iibus.py b/ibus/interface/iibus.py index 9e9a35a..476401b 100644 --- a/ibus/interface/iibus.py +++ b/ibus/interface/iibus.py @@ -19,6 +19,8 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ("IIBus", ) + import dbus.service from ibus.common import \ IBUS_IFACE diff --git a/ibus/interface/ipanel.py b/ibus/interface/ipanel.py index 44478d4..7d10478 100644 --- a/ibus/interface/ipanel.py +++ b/ibus/interface/ipanel.py @@ -19,6 +19,8 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ("IPanel", ) + import dbus.service from ibus.common import \ IBUS_PANEL_IFACE diff --git a/ibus/lookuptable.py b/ibus/lookuptable.py index ab61e50..f2ca622 100644 --- a/ibus/lookuptable.py +++ b/ibus/lookuptable.py @@ -19,6 +19,11 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ( + "LookupTable", + "lookup_table_from_dbus_value" + ) + import dbus from attribute import * from exception import * diff --git a/ibus/object.py b/ibus/object.py index e568568..1bce0d9 100644 --- a/ibus/object.py +++ b/ibus/object.py @@ -19,6 +19,10 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ( + "Object", + ) + import gobject class Object (gobject.GObject): diff --git a/ibus/panel.py b/ibus/panel.py index aa58cab..82f61d1 100644 --- a/ibus/panel.py +++ b/ibus/panel.py @@ -19,6 +19,13 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ( + "PanelItem", + "PanelButton", + "PanelToggleButton", + "PanelMenu", + ) + class PanelItem: pass diff --git a/ibus/property.py b/ibus/property.py index 40b940a..55fb08e 100644 --- a/ibus/property.py +++ b/ibus/property.py @@ -19,6 +19,20 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +__all__ = ( + "PROP_TYPE_NORMAL", + "PROP_TYPE_TOGGLE", + "PROP_TYPE_RADIO", + "PROP_TYPE_SEPARATOR", + "PROP_STATE_UNCHECKED", + "PROP_STATE_CHECKED", + "PROP_STATE_INCONSISTENT", + "Property", + "PropList", + "property_from_dbus_value", + "prop_list_from_dbus_value", + ) + import dbus PROP_TYPE_NORMAL = 0 -- 2.11.4.GIT