Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
bool(x) -> bool

Returns True when the argument x is true, False otherwise.
The builtins True and False are the only two instances of the class bool.
The class bool is a subclass of the class int, and cannot be subclassed.

src/d/j/django-dash-0.4.4/src/dash/utils.py   django-dash(Download)
from dash.helpers import slugify_workspace, lists_overlap, clone_plugin_data, update_plugin_data
from dash.exceptions import PluginWidgetOutOfPlaceholderBoundaries
from dash.settings import RESTRICT_PLUGIN_ACCESS, DEBUG
 
import logging
    ensure_autodiscover()
 
    if not RESTRICT_PLUGIN_ACCESS or getattr(user, 'is_superuser', False):
        return get_registered_plugins()
 
    ensure_autodiscover()
 
    if not RESTRICT_PLUGIN_ACCESS or getattr(user, 'is_superuser', False):
        return get_registered_plugin_uids()
 
    plugin_widget_uids = plugin_widget_registry._registry.keys()
 
    if not RESTRICT_PLUGIN_ACCESS or getattr(user, 'is_superuser', False):
        for uid, plugin in plugin_registry._registry.items():
            # We should make sure that there are widgets available for the placeholder.
    # If not in restricted mode, the quit.
 
    if not RESTRICT_PLUGIN_ACCESS:
        return
 

src/d/j/django-dash-HEAD/src/dash/utils.py   django-dash(Download)
from dash.helpers import slugify_workspace, lists_overlap, clone_plugin_data, update_plugin_data
from dash.exceptions import PluginWidgetOutOfPlaceholderBoundaries
from dash.settings import RESTRICT_PLUGIN_ACCESS, DEBUG
 
import logging
    ensure_autodiscover()
 
    if not RESTRICT_PLUGIN_ACCESS or getattr(user, 'is_superuser', False):
        return get_registered_plugins()
 
    ensure_autodiscover()
 
    if not RESTRICT_PLUGIN_ACCESS or getattr(user, 'is_superuser', False):
        return get_registered_plugin_uids()
 
    plugin_widget_uids = plugin_widget_registry._registry.keys()
 
    if not RESTRICT_PLUGIN_ACCESS or getattr(user, 'is_superuser', False):
        for uid, plugin in plugin_registry._registry.items():
            # We should make sure that there are widgets available for the placeholder.
    # If not in restricted mode, the quit.
 
    if not RESTRICT_PLUGIN_ACCESS:
        return