Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for Hunter (0.2 sec)

  1. .github/actions/people/app/main.py

    class ContributorsResults(BaseModel):
        contributors: Counter
        commenters: Counter
        reviewers: Counter
        translation_reviewers: Counter
        authors: Dict[str, Author]
    
    
    def get_contributors(pr_nodes: List[PullRequestNode]) -> ContributorsResults:
        contributors = Counter()
        commenters = Counter()
        reviewers = Counter()
        translation_reviewers = Counter()
        authors: Dict[str, Author] = {}
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  2. fastapi/dependencies/utils.py

            return False
        dunder_call = getattr(call, "__call__", None)  # noqa: B004
        return inspect.iscoroutinefunction(dunder_call)
    
    
    def is_async_gen_callable(call: Callable[..., Any]) -> bool:
        if inspect.isasyncgenfunction(call):
            return True
        dunder_call = getattr(call, "__call__", None)  # noqa: B004
        return inspect.isasyncgenfunction(dunder_call)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  3. tests/test_dependency_cache.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    counter_holder = {"counter": 0}
    
    
    async def dep_counter():
        counter_holder["counter"] += 1
        return counter_holder["counter"]
    
    
    async def super_dep(count: int = Depends(dep_counter)):
        return count
    
    
    @app.get("/counter/")
    async def get_counter(count: int = Depends(dep_counter)):
        return {"counter": count}
    
    
    @app.get("/sub-counter/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Aug 23 13:30:24 GMT 2022
    - 2.7K bytes
    - Viewed (0)
  4. ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py

    # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Sep 18 19:00:37 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial010.py

    class MySuperContextManager:
        def __init__(self):
            self.db = DBSession()
    
        def __enter__(self):
            return self.db
    
        def __exit__(self, exc_type, exc_value, traceback):
            self.db.close()
    
    
    async def get_db():
        with MySuperContextManager() as db:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 292 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py

                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    @needs_py310
    def test_websocket_invalid_data(app: FastAPI):
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws?q=bar&token=some-token"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  7. fastapi/concurrency.py

        # since we're creating a new limiter for each call, any non-zero limit
        # works (1 is arbitrary)
        exit_limiter = CapacityLimiter(1)
        try:
            yield await run_in_threadpool(cm.__enter__)
        except Exception as e:
            ok = bool(
                await anyio.to_thread.run_sync(
                    cm.__exit__, type(e), e, None, limiter=exit_limiter
                )
            )
            if not ok:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Dec 25 17:57:35 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top