Code
stringlengths
103
85.9k
Summary
listlengths
0
94
Please provide a description of the function:def _async_open(self, session_id, proto_version): ''' Perform the specific steps needed to open a connection to a Bokeh session Specifically, this method coordinates: * Getting a session for a session ID (creating a new one if needed) * Crea...
[]
Please provide a description of the function:def on_message(self, fragment): ''' Process an individual wire protocol fragment. The websocket RFC specifies opcodes for distinguishing text frames from binary frames. Tornado passes us either a text or binary string depending on that opcode...
[]
Please provide a description of the function:def send_message(self, message): ''' Send a Bokeh Server protocol message to the connected client. Args: message (Message) : a message to send ''' try: if _message_test_port is not None: _message_test_...
[]
Please provide a description of the function:def write_message(self, message, binary=False, locked=True): ''' Override parent write_message with a version that acquires a write lock before writing. ''' if locked: with (yield self.write_lock.acquire()): yield ...
[]
Please provide a description of the function:def on_close(self): ''' Clean up when the connection is closed. ''' log.info('WebSocket connection closed: code=%s, reason=%r', self.close_code, self.close_reason) if self.connection is not None: self.application.client_lost(self....
[]
Please provide a description of the function:def bundle_for_objs_and_resources(objs, resources): ''' Generate rendered CSS and JS resources suitable for the given collection of Bokeh objects Args: objs (seq[Model or Document]) : resources (BaseResources or tuple[BaseResources]) Return...
[]
Please provide a description of the function:def _any(objs, query): ''' Whether any of a collection of objects satisfies a given query predicate Args: objs (seq[Model or Document]) : query (callable) Returns: True, if ``query(obj)`` is True for some object in ``objs``, else False ...
[]
Please provide a description of the function:def _use_gl(objs): ''' Whether a collection of Bokeh objects contains a plot requesting WebGL Args: objs (seq[Model or Document]) : Returns: bool ''' from ..models.plots import Plot return _any(objs, lambda obj: isinstance(obj, Plot...
[]
Please provide a description of the function:def _use_tables(objs): ''' Whether a collection of Bokeh objects contains a TableWidget Args: objs (seq[Model or Document]) : Returns: bool ''' from ..models.widgets import TableWidget return _any(objs, lambda obj: isinstance(obj, T...
[]
Please provide a description of the function:def _use_widgets(objs): ''' Whether a collection of Bokeh objects contains a any Widget Args: objs (seq[Model or Document]) : Returns: bool ''' from ..models.widgets import Widget return _any(objs, lambda obj: isinstance(obj, Widget...
[]
Please provide a description of the function:def add_prop_descriptor_to_class(self, class_name, new_class_attrs, names_with_refs, container_names, dataspecs): ''' ``MetaHasProps`` calls this during class creation as it iterates over properties to add, to update its registry of new properties. T...
[]
Please provide a description of the function:def serializable_value(self, obj): ''' Produce the value as it should be serialized. Sometimes it is desirable for the serialized value to differ from the ``__get__`` in order for the ``__get__`` value to appear simpler for user or developer ...
[]
Please provide a description of the function:def set_from_json(self, obj, json, models=None, setter=None): '''Sets the value of this property from a JSON value. Args: obj: (HasProps) : instance to set the property value on json: (JSON-value) : value to set to the attribute to ...
[]
Please provide a description of the function:def instance_default(self, obj): ''' Get the default value that will be used for a specific instance. Args: obj (HasProps) : The instance to get the default value for. Returns: object ''' return self.property...
[]
Please provide a description of the function:def set_from_json(self, obj, json, models=None, setter=None): ''' Sets the value of this property from a JSON value. This method first Args: obj (HasProps) : json (JSON-dict) : models(seq[Model], optional) : ...
[]
Please provide a description of the function:def trigger_if_changed(self, obj, old): ''' Send a change event notification if the property is set to a value is not equal to ``old``. Args: obj (HasProps) The object the property is being set on. old (obj) :...
[]
Please provide a description of the function:def _get(self, obj): ''' Internal implementation of instance attribute access for the ``BasicPropertyDescriptor`` getter. If the value has not been explicitly set by a user, return that value. Otherwise, return the default. Args: ...
[]
Please provide a description of the function:def _get_default(self, obj): ''' Internal implementation of instance attribute access for default values. Handles bookeeping around |PropertyContainer| value, etc. ''' if self.name in obj._property_values: # this shouldn'...
[]
Please provide a description of the function:def _internal_set(self, obj, value, hint=None, setter=None): ''' Internal implementation to set property values, that is used by __set__, set_from_json, etc. Delegate to the |Property| instance to prepare the value appropriately, then `set. ...
[]
Please provide a description of the function:def _real_set(self, obj, old, value, hint=None, setter=None): ''' Internal implementation helper to set property values. This function handles bookkeeping around noting whether values have been explicitly set, etc. Args: obj (Has...
[]
Please provide a description of the function:def _notify_mutated(self, obj, old, hint=None): ''' A method to call when a container is mutated "behind our back" and we detect it with our |PropertyContainer| wrappers. Args: obj (HasProps) : The object who's container v...
[]
Please provide a description of the function:def _trigger(self, obj, old, value, hint=None, setter=None): ''' Unconditionally send a change event notification for the property. Args: obj (HasProps) The object the property is being set on. old (obj) : ...
[]
Please provide a description of the function:def set_from_json(self, obj, json, models=None, setter=None): ''' Sets the value of this property from a JSON value. This method first Args: obj (HasProps) : json (JSON-dict) : models(seq[Model], optional) : ...
[]
Please provide a description of the function:def set_from_json(self, obj, json, models=None, setter=None): ''' Sets the value of this property from a JSON value. This method first separately extracts and removes any ``units`` field in the JSON, and sets the associated units property directly. T...
[]
Please provide a description of the function:def _extract_units(self, obj, value): ''' Internal helper for dealing with units associated units properties when setting values on |UnitsSpec| properties. When ``value`` is a dict, this function may mutate the value of the associated units p...
[]
Please provide a description of the function:def install_notebook_hook(notebook_type, load, show_doc, show_app, overwrite=False): ''' Install a new notebook display hook. Bokeh comes with support for Jupyter notebooks built-in. However, there are other kinds of notebooks in use by different communities. Th...
[]
Please provide a description of the function:def push_notebook(document=None, state=None, handle=None): ''' Update Bokeh plots in a Jupyter notebook output cells with new data or property values. When working the the notebook, the ``show`` function can be passed the argument ``notebook_handle=True``, w...
[]
Please provide a description of the function:def run_notebook_hook(notebook_type, action, *args, **kw): ''' Run an installed notebook hook with supplied arguments. Args: noteboook_type (str) : Name of an existing installed notebook hook actions (str) : Name of the hook ...
[]
Please provide a description of the function:def destroy_server(server_id): ''' Given a UUID id of a div removed or replaced in the Jupyter notebook, destroy the corresponding server sessions and stop it. ''' server = curstate().uuid_to_server.get(server_id, None) if server is None: log.deb...
[]
Please provide a description of the function:def load_notebook(resources=None, verbose=False, hide_banner=False, load_timeout=5000): ''' Prepare the IPython notebook for displaying Bokeh plots. Args: resources (Resource, optional) : how and where to load BokehJS from (default: CDN) ...
[]
Please provide a description of the function:def show_app(app, state, notebook_url, port=0, **kw): ''' Embed a Bokeh server application in a Jupyter Notebook output cell. Args: app (Application or callable) : A Bokeh Application to embed inline in a Jupyter notebook. state (State) ...
[]
Please provide a description of the function:def clamp(value, maximum=None): ''' Clamp numeric values to be non-negative, an optionally, less than a given maximum. Args: value (float) : A number to clamp. maximum (float, optional) : A max...
[]
Please provide a description of the function:def darken(self, amount): ''' Darken (reduce the luminance) of this color. Args: amount (float) : Amount to reduce the luminance by (clamped above zero) Returns: Color ''' hsl = self.to_hsl() ...
[]
Please provide a description of the function:def lighten(self, amount): ''' Lighten (increase the luminance) of this color. Args: amount (float) : Amount to increase the luminance by (clamped above zero) Returns: Color ''' hsl = self.to_...
[]
Please provide a description of the function:def on_click(self, handler): self.on_change('active', lambda attr, old, new: handler(new))
[ " Set up a handler for button state changes (clicks).\n\n Args:\n handler (func) : handler function to call when button is toggled.\n\n Returns:\n None\n\n " ]
Please provide a description of the function:def on_click(self, handler): ''' Set up a handler for button or menu item clicks. Args: handler (func) : handler function to call when button is activated. Returns: None ''' self.on_event(ButtonClick, handler...
[]
Please provide a description of the function:def js_on_click(self, handler): ''' Set up a JavaScript handler for button or menu item clicks. ''' self.js_on_event(ButtonClick, handler) self.js_on_event(MenuItemClick, handler)
[]
Please provide a description of the function:def import_optional(mod_name): ''' Attempt to import an optional dependency. Silently returns None if the requested module is not available. Args: mod_name (str) : name of the optional module to try to import Returns: imported module or Non...
[]
Please provide a description of the function:def detect_phantomjs(version='2.1'): ''' Detect if PhantomJS is avaiable in PATH, at a minimum version. Args: version (str, optional) : Required minimum version for PhantomJS (mostly for testing) Returns: str, path to PhantomJS ...
[]
Please provide a description of the function:def consume(self, fragment): ''' Consume individual protocol message fragments. Args: fragment (``JSON``) : A message fragment to assemble. When a complete message is assembled, the receiver state will reset to beg...
[]
Please provide a description of the function:def setup(app): ''' Required Sphinx extension setup function. ''' app.add_autodocumenter(ColorDocumenter) app.add_autodocumenter(EnumDocumenter) app.add_autodocumenter(PropDocumenter) app.add_autodocumenter(ModelDocumenter)
[]
Please provide a description of the function:def bounce(sequence): ''' Return a driver function that can advance a "bounced" sequence of values. .. code-block:: none seq = [0, 1, 2, 3] # bounce(seq) => [0, 1, 2, 3, 3, 2, 1, 0, 0, 1, 2, ...] Args: sequence (seq) : a sequence o...
[]
Please provide a description of the function:def cosine(w, A=1, phi=0, offset=0): ''' Return a driver function that can advance a sequence of cosine values. .. code-block:: none value = A * cos(w*i + phi) + offset Args: w (float) : a frequency for the cosine driver A (float) : an ...
[]
Please provide a description of the function:def linear(m=1, b=0): ''' Return a driver function that can advance a sequence of linear values. .. code-block:: none value = m * i + b Args: m (float) : a slope for the linear driver x (float) : an offset for the linear driver '''...
[]
Please provide a description of the function:def repeat(sequence): ''' Return a driver function that can advance a repeated of values. .. code-block:: none seq = [0, 1, 2, 3] # repeat(seq) => [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, ...] Args: sequence (seq) : a sequence of values for the ...
[]
Please provide a description of the function:def sine(w, A=1, phi=0, offset=0): ''' Return a driver function that can advance a sequence of sine values. .. code-block:: none value = A * sin(w*i + phi) + offset Args: w (float) : a frequency for the sine driver A (float) : an amplit...
[]
Please provide a description of the function:def setup(app): ''' Required Sphinx extension setup function. ''' app.add_node( collapsible_code_block, html=( html_visit_collapsible_code_block, html_depart_collapsible_code_block ) ) app.add_directive('collaps...
[]
Please provide a description of the function:def collect_filtered_models(discard, *input_values): ''' Collect a duplicate-free list of all other Bokeh models referred to by this model, or by any of its references, etc, unless filtered-out by the provided callable. Iterate over ``input_values`` and desc...
[]
Please provide a description of the function:def get_class(view_model_name): ''' Look up a Bokeh model class, given its view model name. Args: view_model_name (str) : A view model name for a Bokeh model to look up Returns: Model: the model class corresponding to ``view_model_na...
[]
Please provide a description of the function:def _visit_immediate_value_references(value, visitor): ''' Visit all references to another Model without recursing into any of the child Model; may visit the same Model more than once if it's referenced more than once. Does not visit the passed-in value. '''...
[]
Please provide a description of the function:def _visit_value_and_its_immediate_references(obj, visitor): ''' Recurse down Models, HasProps, and Python containers The ordering in this function is to optimize performance. We check the most comomn types (int, float, str) first so that we can quickly return ...
[]
Please provide a description of the function:def ref(self): ''' A Bokeh protocol "reference" to this model, i.e. a dict of the form: .. code-block:: python { 'type' : << view model name >> 'id' : << unique model id >> } Additio...
[]
Please provide a description of the function:def js_link(self, attr, other, other_attr): ''' Link two Bokeh model properties using JavaScript. This is a convenience method that simplifies adding a CustomJS callback to update one Bokeh model property whenever another changes value. Args...
[]
Please provide a description of the function:def js_on_change(self, event, *callbacks): ''' Attach a ``CustomJS`` callback to an arbitrary BokehJS model event. On the BokehJS side, change events for model properties have the form ``"change:property_name"``. As a convenience, if the event name ...
[]
Please provide a description of the function:def on_change(self, attr, *callbacks): ''' Add a callback on this object to trigger when ``attr`` changes. Args: attr (str) : an attribute name on this object *callbacks (callable) : callback functions to register Returns: ...
[]
Please provide a description of the function:def set_select(self, selector, updates): ''' Update objects that match a given selector with the specified attribute/value updates. Args: selector (JSON-like) : updates (dict) : Returns: None ''' ...
[]
Please provide a description of the function:def to_json_string(self, include_defaults): ''' Returns a JSON string encoding the attributes of this object. References to other objects are serialized as references (just the object ID and type info), so the deserializer will need to separa...
[]
Please provide a description of the function:def _attach_document(self, doc): ''' Attach a model to a Bokeh |Document|. This private interface should only ever called by the Document implementation to set the private ._document field properly ''' if self._document is not None a...
[]
Please provide a description of the function:def _to_json_like(self, include_defaults): ''' Returns a dictionary of the attributes of this object, in a layout corresponding to what BokehJS expects at unmarshalling time. This method does not convert "Bokeh types" into "plain JSON types," ...
[]
Please provide a description of the function:def gmap(google_api_key, map_options, **kwargs): ''' Create a new :class:`~bokeh.plotting.gmap.GMap` for plotting. Args: google_api_key (str): Google requires an API key be supplied for maps to function. See: https://developers.googl...
[]
Please provide a description of the function:def copy(self): ''' Return a copy of this color value. Returns: HSL ''' return HSL(self.h, self.s, self.l, self.a)
[]
Please provide a description of the function:def to_css(self): ''' Generate the CSS representation of this HSL color. Returns: str, ``"hsl(...)"`` or ``"hsla(...)"`` ''' if self.a == 1.0: return "hsl(%d, %s%%, %s%%)" % (self.h, self.s*100, self.l*100) el...
[]
Please provide a description of the function:def to_rgb(self): ''' Return a corresponding :class:`~bokeh.colors.rgb.RGB` color for this HSL color. Returns: HSL ''' from .rgb import RGB # prevent circular import r, g, b = colorsys.hls_to_rgb(float(self.h)/360...
[]
Please provide a description of the function:def serverdir(): path = join(ROOT_DIR, 'server') path = normpath(path) if sys.platform == 'cygwin': path = realpath(path) return path
[ " Get the location of the server subpackage\n " ]
Please provide a description of the function:def bokehjsdir(dev=False): dir1 = join(ROOT_DIR, '..', 'bokehjs', 'build') dir2 = join(serverdir(), 'static') if dev and isdir(dir1): return dir1 else: return dir2
[ " Get the location of the bokehjs source files. If dev is True,\n the files in bokehjs/build are preferred. Otherwise uses the files\n in bokeh/server/static.\n " ]
Please provide a description of the function:def start(self): ''' Install the Bokeh Server and its background tasks on a Tornado ``IOLoop``. This method does *not* block and does *not* affect the state of the Tornado ``IOLoop`` You must start and stop the loop yourself, i.e. th...
[]
Please provide a description of the function:def stop(self, wait=True): ''' Stop the Bokeh Server. This stops and removes all Bokeh Server ``IOLoop`` callbacks, as well as stops the ``HTTPServer`` that this instance was configured with. Args: fast (bool): Wh...
[]
Please provide a description of the function:def run_until_shutdown(self): ''' Run the Bokeh Server until shutdown is requested by the user, either via a Keyboard interrupt (Ctrl-C) or SIGTERM. Calling this method will start the Tornado ``IOLoop`` and block all execution in the calling ...
[]
Please provide a description of the function:def get_sessions(self, app_path=None): ''' Gets all currently active sessions for applications. Args: app_path (str, optional) : The configured application path for the application to return sessions for. If None, ...
[]
Please provide a description of the function:def show(self, app_path, browser=None, new='tab'): ''' Opens an app in a browser window or tab. This method is useful for testing or running Bokeh server applications on a local machine but should not call when running Bokeh server for an act...
[]
Please provide a description of the function:def new_module(self): ''' Make a fresh module to run in. Returns: Module ''' self.reset_run_errors() if self._code is None: return None module_name = 'bk_script_' + make_id().replace('-', '') ...
[]
Please provide a description of the function:def run(self, module, post_check): ''' Execute the configured source code in a module and run any post checks. Args: module (Module) : a module to execute the configured code in. post_check(callable) : a function that can rai...
[]
Please provide a description of the function:def loop_until_closed(self): ''' Execute a blocking loop that runs and executes event callbacks until the connection is closed (e.g. by hitting Ctrl-C). While this method can be used to run Bokeh application code "outside" the Bokeh server, t...
[]
Please provide a description of the function:def pull_doc(self, document): ''' Pull a document from the server, overwriting the passed-in document Args: document : (Document) The document to overwrite with server content. Returns: None ''' ...
[]
Please provide a description of the function:def push_doc(self, document): ''' Push a document to the server, overwriting any existing server-side doc. Args: document : (Document) A Document to push to the server Returns: The server reply ''' ...
[]
Please provide a description of the function:def request_server_info(self): ''' Ask for information about the server. Returns: A dictionary of server attributes. ''' if self._server_info is None: self._server_info = self._send_request_server_info() retur...
[]
Please provide a description of the function:def export_png(obj, filename=None, height=None, width=None, webdriver=None, timeout=5): ''' Export the ``LayoutDOM`` object or document as a PNG. If the filename is not given, it is derived from the script name (e.g. ``/foo/myplot.py`` will create ``/foo/myplot....
[]
Please provide a description of the function:def export_svgs(obj, filename=None, height=None, width=None, webdriver=None, timeout=5): ''' Export the SVG-enabled plots within a layout. Each plot will result in a distinct SVG file. If the filename is not given, it is derived from the script name (e.g. ``...
[]
Please provide a description of the function:def get_screenshot_as_png(obj, driver=None, timeout=5, **kwargs): ''' Get a screenshot of a ``LayoutDOM`` object. Args: obj (LayoutDOM or Document) : a Layout (Row/Column), Plot or Widget object or Document to export. driver (selenium.we...
[]
Please provide a description of the function:def _crop_image(image, left=0, top=0, right=0, bottom=0, **kwargs): ''' Crop the border from the layout ''' return image.crop((left, top, right, bottom))
[]
Please provide a description of the function:def _data_from_df(df): ''' Create a ``dict`` of columns from a Pandas ``DataFrame``, suitable for creating a ColumnDataSource. Args: df (DataFrame) : data to convert Returns: dict[str, np.array] ''' _...
[]
Please provide a description of the function:def _df_index_name(df): ''' Return the Bokeh-appropriate column name for a ``DataFrame`` index If there is no named index, then `"index" is returned. If there is a single named index, then ``df.index.name`` is returned. If there is a multi-...
[]
Please provide a description of the function:def add(self, data, name=None): ''' Appends a new column of data to the data source. Args: data (seq) : new data to add name (str, optional) : column name to use. If not supplied, generate a name of the form "Series ##...
[]
Please provide a description of the function:def remove(self, name): ''' Remove a column of data. Args: name (str) : name of the column to remove Returns: None .. note:: If the column name does not exist, a warning is issued. ''' tr...
[]
Please provide a description of the function:def _stream(self, new_data, rollover=None, setter=None): ''' Internal implementation to efficiently update data source columns with new append-only data. The internal implementation adds the setter attribute. [https://github.com/bokeh/bokeh/issues/65...
[]
Please provide a description of the function:def patch(self, patches, setter=None): ''' Efficiently update data source columns at specific locations If it is only necessary to update a small subset of data in a ``ColumnDataSource``, this method can be used to efficiently update only the...
[]
Please provide a description of the function:def silence(warning, silence=True): ''' Silence a particular warning on all Bokeh models. Args: warning (Warning) : Bokeh warning to silence silence (bool) : Whether or not to silence the warning Returns: A set containing the all silence...
[]
Please provide a description of the function:def check_integrity(models): ''' Apply validation and integrity checks to a collection of Bokeh models. Args: models (seq[Model]) : a collection of Models to test Returns: None This function will emit log warning and error messages for all ...
[]
Please provide a description of the function:def apply_to_model(self, model): ''' Apply this theme to a model. .. warning:: Typically, don't call this method directly. Instead, set the theme on the :class:`~bokeh.document.Document` the model is a part of. ''' mo...
[]
Please provide a description of the function:def OutputDocumentFor(objs, apply_theme=None, always_new=False): ''' Find or create a (possibly temporary) Document to use for serializing Bokeh content. Typical usage is similar to: .. code-block:: python with OutputDocumentFor(models): ...
[]
Please provide a description of the function:def submodel_has_python_callbacks(models): ''' Traverses submodels to check for Python (event) callbacks ''' has_python_callback = False for model in collect_models(models): if len(model._callbacks) > 0 or len(model._event_callbacks) > 0: ...
[]
Please provide a description of the function:def from_networkx(graph, layout_function, **kwargs): ''' Generate a ``GraphRenderer`` from a ``networkx.Graph`` object and networkx layout function. Any keyword arguments will be passed to the layout function. Only two dimensional lay...
[]
Please provide a description of the function:def enumeration(*values, **kwargs): ''' Create an |Enumeration| object from a sequence of values. Call ``enumeration`` with a sequence of (unique) strings to create an Enumeration object: .. code-block:: python #: Specify the horizontal alignment f...
[]
Please provide a description of the function:def generate_session_id(secret_key=settings.secret_key_bytes(), signed=settings.sign_sessions()): secret_key = _ensure_bytes(secret_key) if signed: # note: '-' can also be in the base64 encoded signature base_id = _get_random_string(secret_key=se...
[ "Generate a random session ID.\n\n Typically, each browser tab connected to a Bokeh application\n has its own session ID. In production deployments of a Bokeh\n app, session IDs should be random and unguessable - otherwise\n users of the app could interfere with one another.\n\n If session IDs are s...
Please provide a description of the function:def check_session_id_signature(session_id, secret_key=settings.secret_key_bytes(), signed=settings.sign_sessions()): secret_key = _ensure_bytes(secret_key) if signed: pieces = session_id.split('-', 1) if len(pieces)...
[ "Check the signature of a session ID, returning True if it's valid.\n\n The server uses this function to check whether a session ID\n was generated with the correct secret key. If signed sessions are disabled,\n this function always returns True.\n\n Args:\n session_id (str) : The session ID to c...
Please provide a description of the function:def _get_random_string(length=44, allowed_chars='abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', secret_key=settings.secret_key_bytes()): secret_key = _ensure_bytes(secret_key) ...
[ "\n Return a securely generated random string.\n With the a-z, A-Z, 0-9 character set:\n Length 12 is a 71-bit value. log_2((26+26+10)^12) =~ 71\n Length 44 is a 261-bit value. log_2((26+26+10)^44) = 261\n " ]
Please provide a description of the function:def notebook_content(model, notebook_comms_target=None, theme=FromCurdoc): ''' Return script and div that will display a Bokeh plot in a Jupyter Notebook. The data for the plot is stored directly in the returned HTML. Args: model (Model) : Bokeh obj...
[]
Please provide a description of the function:def from_py_func(cls, func, v_func): ''' Create a ``CustomJSTransform`` instance from a pair of Python functions. The function is translated to JavaScript using PScript. The python functions must have no positional arguments. It's possible to...
[ "\\\n To use Python functions for CustomJSTransform, you need PScript\n '(\"conda install -c conda-forge pscript\" or \"pip install pscript\")" ]
Please provide a description of the function:def from_coffeescript(cls, func, v_func, args={}): ''' Create a ``CustomJSTransform`` instance from a pair of CoffeeScript snippets. The function bodies are translated to JavaScript functions using node and therefore require return statements. ...
[]
Please provide a description of the function:def abstract(cls): ''' A decorator to mark abstract base classes derived from |HasProps|. ''' if not issubclass(cls, HasProps): raise TypeError("%s is not a subclass of HasProps" % cls.__name__) # running python with -OO will discard docstrings -> _...
[]