Creates MODULE.bazel and WORKSPACE.bzlmod files to enable bazel-skylib to work with the `--experimental_enable_bzlmod` flag. rules_go has been updated as the previously used version is not available in the BCR. stardoc has been updated due to a strange issue with Bzlmod enabled that caused the `diff_test` and `unittest` docs to be generated without any contents that was magically fixed upon updating. bazelbuild/bazel-central-registry#124 Co-authored-by: Alexandre Rostovtsev <arostovtsev@google.com>
4.3 KiB
Executable file
Skylib module containing functions checking types.
types.is_list
types.is_list(v)
Returns True if v is an instance of a list.
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v is an instance of a list, False otherwise.
types.is_string
types.is_string(v)
Returns True if v is an instance of a string.
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v is an instance of a string, False otherwise.
types.is_bool
types.is_bool(v)
Returns True if v is an instance of a bool.
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v is an instance of a bool, False otherwise.
types.is_none
types.is_none(v)
Returns True if v has the type of None.
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v is None, False otherwise.
types.is_int
types.is_int(v)
Returns True if v is an instance of a signed integer.
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v is an instance of a signed integer, False otherwise.
types.is_tuple
types.is_tuple(v)
Returns True if v is an instance of a tuple.
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v is an instance of a tuple, False otherwise.
types.is_dict
types.is_dict(v)
Returns True if v is an instance of a dict.
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v is an instance of a dict, False otherwise.
types.is_function
types.is_function(v)
Returns True if v is an instance of a function.
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v is an instance of a function, False otherwise.
types.is_depset
types.is_depset(v)
Returns True if v is an instance of a depset
.
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v is an instance of a depset
, False otherwise.
types.is_set
types.is_set(v)
Returns True if v is a set created by sets.make().
PARAMETERS
Name | Description | Default Value |
---|---|---|
v | The value whose type should be checked. | none |
RETURNS
True if v was created by sets.make(), False otherwise.