Did I find the right examples for you? yes no

All Samples(5)  |  Call(2)  |  Derive(0)  |  Import(3)

        def is_success(code):
    return code >= 200 and code <= 299
        


src/r/e/rest-pandas-0.1.0/rest_pandas/renderers.py   rest-pandas(Download)
    def render(self, data, accepted_media_type=None, renderer_context=None):
        if 'response' in renderer_context:
            status_code = renderer_context['response'].status_code
            if not status.is_success(status_code):
                return "Error: %s" % data.get('detail', status_code)

src/d/j/django-rest-pandas-HEAD/rest_pandas/renderers.py   django-rest-pandas(Download)
    def render(self, data, accepted_media_type=None, renderer_context=None):
        if 'response' in renderer_context:
            status_code = renderer_context['response'].status_code
            if not status.is_success(status_code):
                return "Error: %s" % data.get('detail', status_code)

src/t/r/treeherder-service-HEAD/vendor/rest_framework/tests/test_status.py   treeherder-service(Download)
from __future__ import unicode_literals
from django.test import TestCase
from rest_framework.status import (
    is_informational, is_success, is_redirect, is_client_error, is_server_error
)

src/d/j/django-rest-framework-HEAD/rest_framework/tests/test_status.py   django-rest-framework(Download)
from __future__ import unicode_literals
from django.test import TestCase
from rest_framework.status import (
    is_informational, is_success, is_redirect, is_client_error, is_server_error
)

src/d/j/djangorestframework-2.3.13/rest_framework/tests/test_status.py   djangorestframework(Download)
from __future__ import unicode_literals
from django.test import TestCase
from rest_framework.status import (
    is_informational, is_success, is_redirect, is_client_error, is_server_error
)