Did I find the right examples for you? yes no

All Samples(18)  |  Call(14)  |  Derive(0)  |  Import(4)
Delete the NeededResources object from the thread-local data to leave a
clean environment.

This function will silently pass whenever there is no NeededResources
object in the thread-local in the first place.

        def del_needed():
    """Delete the NeededResources object from the thread-local data to leave a
    clean environment.

    This function will silently pass whenever there is no NeededResources
    object in the thread-local in the first place.
    """
    try:
        del thread_local_needed_data.__dict__[NEEDED]
    except KeyError:
        pass
        


src/f/a/fanstatic-1.0a5/fanstatic/injector.py   fanstatic(Download)
                response.content_type.lower() in CONTENT_TYPES):
            # Clean up after our behinds.
            fanstatic.del_needed()
            return response(environ, start_response)
 
 
        # Clean up after our behinds.
        fanstatic.del_needed()
 
        return response(environ, start_response)

src/f/l/Flask-Fanstatic-0.2.0/flask_fanstatic.py   Flask-Fanstatic(Download)
from fanstatic import (init_needed, del_needed, Publisher, get_library_registry,
                       DEFAULT_SIGNATURE, Resource, Library, Group)
from flask import Blueprint, g, Markup, current_app, request
from werkzeug import cached_property
from werkzeug.utils import import_string
  def teardown_request(self, *args):
    del_needed()
 
 
class _FanstaticContext(object):

src/f/l/flask-fanstatic-HEAD/flask_fanstatic.py   flask-fanstatic(Download)
from fanstatic import (init_needed, del_needed, Publisher, get_library_registry,
                       DEFAULT_SIGNATURE, Resource, Library, Group)
from flask import Blueprint, g, Markup, current_app, request
from werkzeug import cached_property
from werkzeug.utils import import_string
  def teardown_request(self, *args):
    del_needed()
 
 
class _FanstaticContext(object):

src/p/y/pyramid_fanstatic-0.5/pyramid_fanstatic/__init__.py   pyramid_fanstatic(Download)
                response.content_type.lower() in ['text/html',
                                                  'text/xml']):
            fanstatic.del_needed()
            return response
 
            response.body = ''
            response.write(result)
        fanstatic.del_needed()
        return response
 

src/p/y/pyramid_fanstatic-HEAD/pyramid_fanstatic/__init__.py   pyramid_fanstatic(Download)
                response.content_type.lower() in ['text/html',
                                                  'text/xml']):
            fanstatic.del_needed()
            return response
 
            response.body = ''
            response.write(result)
        fanstatic.del_needed()
        return response
 

src/f/a/fanstatic-1.0a5/tests/test_core.py   fanstatic(Download)
import pytest
 
from fanstatic import (Library,
                       Resource,
                       NeededResources,
 
    # Clear it.
    del_needed()
 
    # It is gone, really.
    with pytest.raises(KeyError):
        thread_local_needed_data.__dict__[NEEDED]
 
    # Clearing it again is OK.
    del_needed()

src/f/a/fanstatic-tools-0.2/fanstatic/test_core.py   fanstatic-tools(Download)
import six
 
from fanstatic import (Library,
                       Resource,
                       NeededResources,
 
    # Clear it.
    del_needed()
 
    # It is gone, really.
    with pytest.raises(KeyError):
        thread_local_needed_data.__dict__[NEEDED]
 
    # Clearing it again is OK.
    del_needed()

src/f/a/fanstatic-1.0a5/tests/test_slot.py   fanstatic(Download)
        a.need({slot: c})
    finally:
        fanstatic.del_needed()
    assert slot in needed._slots
 
        g.need({slot: c})
    finally:
        fanstatic.del_needed()
    assert slot in needed._slots