Did I find the right examples for you? yes no

All Samples(21)  |  Call(18)  |  Derive(0)  |  Import(3)

src/r/h/Rhetoric-HEAD/rhetoric/view.py   Rhetoric(Download)
import venusian
 
from rhetoric.predicates import match_api_version
 
 
            match = False
            for allowed_api_pattern in predicates['api_version']:
                match = match_api_version(request_api_version, allowed_api_pattern)
                if match:
                    break

src/r/h/Rhetoric-0.1.12/rhetoric/view.py   Rhetoric(Download)
import venusian
 
from rhetoric.predicates import match_api_version
 
 
            match = False
            for allowed_api_pattern in predicates['api_version']:
                match = match_api_version(request_api_version, allowed_api_pattern)
                if match:
                    break

src/r/h/Rhetoric-HEAD/tests/predicates_tests.py   Rhetoric(Download)
    def test_match_api_version(self):
        from rhetoric.predicates import match_api_version
 
        assert match_api_version('1.0', '1.0') is True
        assert match_api_version('1.0', '1.00') is True
        assert match_api_version('1.0', '1.0.0') is True
        assert match_api_version('1', '1.0.0') is True