示例#1
0
 def __init__(self):
     self.__dict__ = ASTNGManager.brain
     if not self.__dict__:
         OptionsProviderMixIn.__init__(self)
         self.load_defaults()
         # NOTE: cache entries are added by the [re]builder
         self.astng_cache = {}
         self._mod_file_cache = {}
示例#2
0
    def __init__(self, linter=None):
        """checker instances should have the linter as argument

        linter is an object implementing ILinter
        """
        self.name = self.name.lower()
        OptionsProviderMixIn.__init__(self)
        self.linter = linter
示例#3
0
    def __init__(self, linter=None):
        """checker instances should have the linter as argument

        linter is an object implementing ILinter
        """
        self.name = self.name.lower()
        OptionsProviderMixIn.__init__(self)
        self.linter = linter
示例#4
0
 def __init__(self, borg=True):
     if borg:
         self.__dict__ = ASTNGManager.brain
     if not self.__dict__:
         OptionsProviderMixIn.__init__(self)
         self.load_defaults()
         # NOTE: cache entries are added by the [re]builder
         self._cache = {}  #Cache(cache_size)
         self._mod_file_cache = {}
示例#5
0
 def __init__(self, borg=True):
     if borg:
         self.__dict__ = ASTNGManager.brain
     if not self.__dict__:
         OptionsProviderMixIn.__init__(self)
         self.load_defaults()
         # NOTE: cache entries are added by the [re]builder
         self._cache = {} #Cache(cache_size)
         self._mod_file_cache = {}
示例#6
0
 def __init__(self, borg=True):
     if borg:
         self.__dict__ = ASTNGManager.brain
     if not self.__dict__:
         OptionsProviderMixIn.__init__(self)
         self._cache = None
         self._mod_file_cache = None
         self.set_cache_size(200)
         self.load_defaults()
示例#7
0
    def __init__(self, linter=None):
        """checker instances should have the linter as argument

        linter is an object implementing ILinter
        """
        ASTWalker.__init__(self, self)
        self.name = self.name.lower()
        OptionsProviderMixIn.__init__(self)
        self.linter = linter
        # messages that are active for the current check
        self.active_msgs = set()
示例#8
0
    def __init__(self, linter=None):
        """checker instances should have the linter as argument

        linter is an object implementing ILinter
        """
        ASTWalker.__init__(self, self)
        self.name = self.name.lower()
        OptionsProviderMixIn.__init__(self)
        self.linter = linter
        # messages that are active for the current check
        self.active_msgs = set()
示例#9
0
 def __init__(self):
     self.__dict__ = AstroidManager.brain
     if not self.__dict__:
         OptionsProviderMixIn.__init__(self)
         self.load_defaults()
         # NOTE: cache entries are added by the [re]builder
         self.astroid_cache = {}
         self._mod_file_cache = {}
         self.transforms = collections.defaultdict(list)
         self._failed_import_hooks = []
         self.always_load_extensions = False
         self.extension_package_whitelist = set()
 def __init__(self):
     self.__dict__ = AstroidManager.brain
     if not self.__dict__:
         OptionsProviderMixIn.__init__(self)
         self.load_defaults()
         # NOTE: cache entries are added by the [re]builder
         self.astroid_cache = {}
         self._mod_file_cache = {}
         self.transforms = collections.defaultdict(list)
         self._failed_import_hooks = []
         self.always_load_extensions = False
         self.extension_package_whitelist = set()
示例#11
0
 def __init__(self, args):
     self.options = (("class",
             {'type' : "string", 'metavar' : "<class name>",
              'action' : "callback", 'callback': self.cb_plug_class,
              'help' : """Plug the logger on the given class."""}),
            ("module",
             {'type':'string', 'metavar' : "<module name>",
              'action' : "callback", 'callback': self.cb_plug_module,
              'help' : """Plug the logger on the given module."""}),
                     
                     ("threads",
                      {'default' :0, 'type' : "yn", 'metavar' : "<y_or_n>",
                       'help' : """Log thread information."""}),
                     ("time",
                      {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>',
                       'help' : 'Log time information.'}),               
                     ("oid",
                      {'default' :1, 'type' : "yn", 'metavar' : "<y_or_n>",
                       'help' : """Log object ids."""}),
            ("parameters",
             {'default': 1, 'type' : 'yn', 'metavar' : '<y_or_n>',
              'help' : 'Log arguments\'values.'}),               
                     )
            
     OptionsProviderMixIn.__init__(self)
     OptionsManagerMixIn.__init__(self, usage=__doc__,
                                  version=version,
                                  config_file='.pytracerc')
     self.register_options_provider(self)
     #self._weaved = {}
     # insert current working directory to the python path to have a correct
     # behaviour
     sys.path.insert(0, os.getcwd())
     # load configuration
     self.load_file_configuration()
     args = self.load_command_line_configuration(args)
     if not args:
         print self.help()            
     sys.argv = args        
     execfile(args[0], globals())
示例#12
0
 def __init__(self):
     OptionsManagerMixIn.__init__(self, usage="")
     OptionsProviderMixIn.__init__(self)
     self.register_options_provider(self)
     self.load_provider_defaults()
 def __init__(self):
     OptionsManagerMixIn.__init__(self, usage="")
     OptionsProviderMixIn.__init__(self)
     self.register_options_provider(self)
     self.load_provider_defaults()