- Sort Score
- Result 10 results
- Languages All
Results 41 - 48 of 48 for type$val (0.13 sec)
-
staging/src/k8s.io/apiserver/pkg/cel/cidr.go
} // ConvertToType implements ref.Val.ConvertToType. func (d CIDR) ConvertToType(typeVal ref.Type) ref.Val { switch typeVal { case CIDRType: return d case types.TypeType: return CIDRType case types.StringType: return types.String(d.Prefix.String()) } return types.NewErr("type conversion error from '%s' to '%s'", CIDRType, typeVal) } // Equal implements ref.Val.Equal. func (d CIDR) Equal(other ref.Val) ref.Val {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 12:03:04 UTC 2023 - 2.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/lazy/lazy.go
// Only its own type and "Type" type are allowed. func (m *MapValue) ConvertToType(typeVal ref.Type) ref.Val { switch typeVal { case m.typeValue: return m case types.TypeType: return m.typeValue } return types.NewErr("disallowed conversion from %q to %q", m.typeValue.TypeName(), typeVal.TypeName()) } // Equal returns true if the other object is the same pointer-wise.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 23 21:31:27 UTC 2023 - 4.9K bytes - Viewed (0) -
fastapi/types.py
import types from enum import Enum from typing import Any, Callable, Dict, Set, Type, TypeVar, Union from pydantic import BaseModel DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any]) UnionType = getattr(types, "UnionType", Union) ModelNameMap = Dict[Union[Type[BaseModel], Type[Enum]], str]
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Dec 12 00:29:03 UTC 2023 - 383 bytes - Viewed (0) -
tests/test_generic_parameterless_depends.py
from typing import TypeVar from fastapi import Depends, FastAPI from fastapi.testclient import TestClient from typing_extensions import Annotated app = FastAPI() T = TypeVar("T") Dep = Annotated[T, Depends()] class A: pass class B: pass @app.get("/a") async def a(dep: Dep[A]): return {"cls": dep.__class__.__name__} @app.get("/b") async def b(dep: Dep[B]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Apr 02 02:52:56 UTC 2024 - 1.8K bytes - Viewed (0) -
fastapi/concurrency.py
from typing import AsyncGenerator, ContextManager, TypeVar import anyio from anyio import CapacityLimiter from starlette.concurrency import iterate_in_threadpool as iterate_in_threadpool # noqa from starlette.concurrency import run_in_threadpool as run_in_threadpool # noqa from starlette.concurrency import ( # noqa run_until_first_complete as run_until_first_complete, ) _T = TypeVar("_T") @asynccontextmanager
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Mon Dec 25 17:57:35 UTC 2023 - 1.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/internal/analysisutil/util.go
func HasSideEffects(info *types.Info, e ast.Expr) bool { safe := true ast.Inspect(e, func(node ast.Node) bool { switch n := node.(type) { case *ast.CallExpr: typVal := info.Types[n.Fun] switch { case typVal.IsType(): // Type conversion, which is safe. case typVal.IsBuiltin(): // Builtin func, conservatively assumed to not // be safe for now. safe = false return false default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 3.9K bytes - Viewed (0) -
fastapi/datastructures.py
from typing import ( Any, BinaryIO, Callable, Dict, Iterable, Optional, Type, TypeVar, cast, ) from fastapi._compat import ( PYDANTIC_V2, CoreSchema, GetJsonSchemaHandler, JsonSchemaValue, with_info_plain_validator_function, ) from starlette.datastructures import URL as URL # noqa: F401 from starlette.datastructures import Address as Address # noqa: F401
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 5.6K bytes - Viewed (1) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer/sigchanyzer.go
if name.Obj == arg.Obj { return as.Values[i] } } } return nil } func isBuiltinMake(info *types.Info, call *ast.CallExpr) bool { typVal := info.Types[call.Fun] if !typVal.IsBuiltin() { return false } switch fun := call.Fun.(type) { case *ast.Ident: return info.ObjectOf(fun).Name() == "make" default: return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 3.8K bytes - Viewed (0)