- Sort Score
- Num 10 results
- Language All
Results 11 - 19 of 19 for value_error (0.07 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/test_datastructures.py
import pytest from fastapi import FastAPI, UploadFile from fastapi.datastructures import Default from fastapi.testclient import TestClient def test_upload_file_invalid_pydantic_v2(): with pytest.raises(ValueError): UploadFile._validate("not a Starlette UploadFile", {}) def test_default_placeholder_equals(): placeholder_1 = Default("a") placeholder_2 = Default("a") assert placeholder_1 == placeholder_2
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 1.8K bytes - Click Count (0) -
scripts/translation_fixer.py
) # Write back the fixed document doc_lines.append("") # Ensure file ends with a newline path.write_text("\n".join(doc_lines), encoding="utf-8") except ValueError as e: print(f"Error processing {path}: {e}") return False return True @cli.command() def fix_all(ctx: typer.Context, language: str): docs = get_all_paths(language)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 10 21:48:08 GMT 2026 - 3.2K bytes - Click Count (0) -
scripts/mkdocs_hooks.py
elif isinstance(values[0], list): resolve_files(items=values[0], files=files, config=config) else: raise ValueError(f"Unexpected value: {values}") def on_files(files: Files, *, config: MkDocsConfig) -> Files: resolve_files(items=config.nav or [], files=files, config=config) if "logo" in config.theme:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 6.6K bytes - Click Count (0) -
tests/test_jsonable_encoder.py
assert jsonable_encoder(item, exclude={}) == {"name": "foo", "count": 100} def test_encode_unsupported(): unserializable = Unserializable() with pytest.raises(ValueError): jsonable_encoder(unserializable) def test_encode_custom_json_encoders_model_pydanticv2(): from pydantic import field_serializer class ModelWithCustomEncoder(BaseModel):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 9.2K bytes - Click Count (0) -
fastapi/datastructures.py
return await super().close() @classmethod def _validate(cls, __input_value: Any, _: Any) -> "UploadFile": if not isinstance(__input_value, StarletteUploadFile): raise ValueError(f"Expected UploadFile, received: {type(__input_value)}") return cast(UploadFile, __input_value) @classmethod def __get_pydantic_json_schema__(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 5.2K bytes - Click Count (0) -
fastapi/encoders.py
except Exception as e: errors: list[Exception] = [] errors.append(e) try: data = vars(obj) except Exception as e: errors.append(e) raise ValueError(errors) from e return jsonable_encoder( data, include=include, exclude=exclude, by_alias=by_alias, exclude_unset=exclude_unset,Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 10.9K bytes - Click Count (0) -
scripts/translate.py
lang_code=language, auto_fix=False, path=str(out_path), ) break # Exit loop if no errors except ValueError as e: print( f"Translation check failed on attempt {attempt_no}/{MAX_ATTEMPTS}: {e}" ) continue # Retry if not reached max attemptsCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:37:41 GMT 2026 - 15.8K bytes - Click Count (0) -
RELEASE.md
* Add a Nearest Neighbor Resize op. * Add an `ignore_unknown` argument to `parse_values` which suppresses ValueError for unknown hyperparameter types. Such * Add `tf.linalg.matvec` convenience function. * `tf.einsum()`raises `ValueError` for unsupported equations like `"ii->"`. * Add DCT-I and IDCT-I in `tf.signal.dct` and `tf.signal.idct`. * Add LU decomposition op.Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Mon Mar 30 18:31:38 GMT 2026 - 746.5K bytes - Click Count (3) -
api/go1.txt
pkg reflect, type Type interface, String() string pkg reflect, type Type interface, unexported methods pkg reflect, type Value struct pkg reflect, type ValueError struct pkg reflect, type ValueError struct, Kind Kind pkg reflect, type ValueError struct, Method string pkg regexp, func Compile(string) (*Regexp, error) pkg regexp, func CompilePOSIX(string) (*Regexp, error)
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Wed Aug 14 18:58:28 GMT 2013 - 1.7M bytes - Click Count (0)