Coverage for coherence/extern/simple_plugin.py : 95%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*-
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php
# Copyright 2007, Frank Scholz <coherence@beebits.net>
meant as a replacement when setuptools/pkg_resources are not available """
""" a new style class that betrays all its sub-classes """
""" singleton class which holds information about known plugins
currently a singleton, and even a class, seems to be overkill for this, but maybe we'll add some more functionality later """
""" creates the singleton """ return obj else:
""" initializes the class and checks in if a path is provided """
""" import all valid files from plugin_path """ os.path.splitext(p)[1] == '.py': print("can't import %r - %s" % ( os.path.splitext(plugin)[0], msg)) else: os.path.splitext(plugin)[0], msg))
""" returns a list of all Plugin subclasses """
else:
|