Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for endswith (0.32 sec)

  1. scripts/mkdocs_hooks.py

        available_langs = get_mkdocs_material_langs()
        dir_path = Path(config.docs_dir)
        lang = dir_path.parent.name
        if lang in available_langs:
            config.theme["language"] = lang
        if not (config.site_url or "").endswith(f"{lang}/") and not lang == "en":
            config.site_url = f"{config.site_url}{lang}/"
        return config
    
    
    def resolve_file(*, item: str, files: Files, config: MkDocsConfig) -> None:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  2. tests/test_filter_pydantic_sub_model/app_pv1.py

    
    class ModelA(BaseModel):
        name: str
        description: Optional[str] = None
        model_b: ModelB
    
        @validator("name")
        def lower_username(cls, name: str, values):
            if not name.endswith("A"):
                raise ValueError("name must end in A")
            return name
    
    
    async def get_model_c() -> ModelC:
        return ModelC(username="test-user", password="test-password")
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 784 bytes
    - Viewed (0)
  3. tests/test_filter_pydantic_sub_model_pv2.py

            name: str
            description: Optional[str] = None
            foo: ModelB
    
            @field_validator("name")
            def lower_username(cls, name: str, info: ValidationInfo):
                if not name.endswith("A"):
                    raise ValueError("name must end in A")
                return name
    
        async def get_model_c() -> ModelC:
            return ModelC(username="test-user", password="test-password")
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  4. fastapi/routing.py

                                    if message.get_content_maintype() == "application":
                                        subtype = message.get_content_subtype()
                                        if subtype == "json" or subtype.endswith("+json"):
                                            json_body = await request.json()
                                if json_body != Undefined:
                                    body = json_body
                                else:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
Back to top