Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 85 for Tuple1 (0.14 sec)

  1. tests/test_typing_python39.py

    @needs_py310
    def test_typing():
        types = {
            list[int]: [1, 2, 3],
            dict[str, list[int]]: {"a": [1, 2, 3], "b": [4, 5, 6]},
            set[int]: [1, 2, 3],  # `set` is converted to `list`
            tuple[int, ...]: [1, 2, 3],  # `tuple` is converted to `list`
        }
        for test_type, expect in types.items():
            app = FastAPI()
    
            @app.post("/", response_model=test_type)
            def post_endpoint(input: test_type):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 709 bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/fess/helper/SystemHelperTest.java

            final List<Tuple3<String, String, String>> virtualHostList = new ArrayList<>();
            ComponentUtil.setFessConfig(new FessConfig.SimpleImpl() {
                private static final long serialVersionUID = 1L;
    
                @SuppressWarnings("unchecked")
                @Override
                public Tuple3<String, String, String>[] getVirtualHosts() {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  3. tests/test_dependency_security_overrides.py

    from typing import List, Tuple
    
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import SecurityScopes
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    def get_user(required_scopes: SecurityScopes):
        return "john", required_scopes.scopes
    
    
    def get_user_override(required_scopes: SecurityScopes):
        return "alice", required_scopes.scopes
    
    
    def get_data():
        return [1, 2, 3]
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jun 14 15:54:46 UTC 2020
    - 1.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/RequestBody.kt

       * bodies may only be used with HTTP/2. Calls to HTTP/1 servers will fail before the HTTP request
       * is transmitted. If you cannot ensure that your client and server both support HTTP/2, do not
       * use this feature.
       *
       * ### Duplex APIs
       *
       * With regular request bodies it is not legal to write bytes to the sink passed to
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Jan 25 14:41:37 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt

     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package mockwebserver3.internal.duplex
    
    import java.io.IOException
    import java.util.concurrent.CountDownLatch
    import java.util.concurrent.FutureTask
    import java.util.concurrent.LinkedBlockingQueue
    import java.util.concurrent.TimeUnit
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/RealStream.kt

     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package mockwebserver3.internal.duplex
    
    import mockwebserver3.Stream
    import okhttp3.internal.http2.ErrorCode
    import okhttp3.internal.http2.Http2Stream
    import okio.buffer
    
    /** Adapt OkHttp's internal [Http2Stream] type to the public [Stream] type. */
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Dec 31 18:24:52 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  7. tests/test_invalid_sequence_param.py

    from typing import Dict, List, Optional, Tuple
    
    import pytest
    from fastapi import FastAPI, Query
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: List[Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  8. docs/ru/docs/python-types.md

    И все же редактор знает, что это `str`, и поддерживает это.
    
    #### `Tuple` и `Set`
    
    Вы бы сделали то же самое, чтобы объявить `tuple` и `set`:
    
    ```Python hl_lines="1  4"
    {!../../docs_src/python_types/tutorial007.py!}
    ```
    
    Это означает:
    
    * Переменная `items_t` является `tuple` с 3 элементами: `int`, другим `int` и `str`.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  9. docs/en/docs/python-types.md

    Notice that the variable `item` is one of the elements in the list `items`.
    
    And still, the editor knows it is a `str`, and provides support for that.
    
    #### Tuple and Set
    
    You would do the same to declare `tuple`s and `set`s:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="1"
    {!> ../../docs_src/python_types/tutorial007_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 11:47:53 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  10. tests/test_invalid_path_param.py

    from typing import Dict, List, Tuple
    
    import pytest
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/{id}")
            def read_items(id: List[Item]):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Jun 03 17:59:40 UTC 2019
    - 1.7K bytes
    - Viewed (0)
Back to top