Skip to main content
Version: 1.5.x

types

Skylib module containing functions checking types.

Macros and Functions

types.is_list

Returns True if v is an instance of a list.

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_list(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.

types.is_string

Returns True if v is an instance of a string.

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_string(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.

types.is_bool

Returns True if v is an instance of a bool.

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_bool(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.

types.is_none

Returns True if v has the type of None.

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_none(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.

types.is_int

Returns True if v is an instance of a signed integer.

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_int(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.

types.is_tuple

Returns True if v is an instance of a tuple.

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_tuple(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.

types.is_dict

Returns True if v is an instance of a dict.

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_dict(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.

types.is_function

Returns True if v is an instance of a function.

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_function(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.

types.is_depset

Returns True if v is an instance of a depset.

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_depset(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.

types.is_set

Returns True if v is a set created by sets.make().

Example usage (generated):

load("@bazel_skylib//lib:types.bzl", "types")

types.is_set(
# The value whose type should be checked.
v = None,
)

v

Required.

The value whose type should be checked.