type (10)
datetime¶
datetime(value: Any) -> bool
Return whether a value is a datetime.
DocStrings
Source code in src/jinjarope/envtests.py
97 98 99 |
|
dict¶
dict(value: Any) -> bool
Return whether a value is a tuple.
DocStrings
Source code in src/jinjarope/envtests.py
56 57 58 |
|
instance¶
instance(obj: object, typ: str | type) -> bool
Like the isinstance builtin, but also accepts strs as type.
DocStrings
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
object
|
The object to check |
required |
typ
|
str | type
|
A type (name) |
required |
Source code in src/jinjarope/envtests.py
71 72 73 74 75 76 77 78 79 80 81 |
|
list¶
list(value: Any) -> bool
Return whether a value is a list.
DocStrings
Source code in src/jinjarope/envtests.py
41 42 43 |
|
number¶
number(value: Any) -> bool
Try to convert value to a float.
DocStrings
Source code in src/jinjarope/envtests.py
27 28 29 30 31 32 33 |
|
set¶
set(value: Any) -> bool
Return whether a value is a set.
DocStrings
Source code in src/jinjarope/envtests.py
46 47 48 |
|
string_like¶
string_like(value: Any) -> bool
Return whether a value is a string or string like object.
DocStrings
Source code in src/jinjarope/envtests.py
102 103 104 |
|
subclass¶
subclass(obj: type, typ: str | type) -> bool
Like the issubclass builtin, but also accepts strs as type.
DocStrings
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
type
|
The class to check |
required |
typ
|
str | type
|
A type (name) |
required |
Source code in src/jinjarope/envtests.py
84 85 86 87 88 89 90 91 92 93 94 |
|
tuple¶
tuple(value: Any) -> bool
Return whether a value is a tuple.
DocStrings
Source code in src/jinjarope/envtests.py
51 52 53 |
|
type¶
type(value: Any) -> bool
Return whether a value is a type.
DocStrings
Source code in src/jinjarope/envtests.py
36 37 38 |
|