How to use the yaql.language.specs.yaql_property function in yaql

To help you get started, we’ve selected a few yaql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openstack / yaql / yaql / standard_library / date_time.py View on Github external
@specs.yaql_property(DATETIME_TYPE)
def weekday(dt):
    return dt.weekday()
github openstack / murano / murano / dsl / reflection.py View on Github external
@specs.yaql_property(dsl_types.MuranoProperty)
@specs.name('name')
def property_name(murano_property):
    return murano_property.name
github openstack / murano / murano / dsl / reflection.py View on Github external
@specs.yaql_property(dsl_types.MuranoMethodArgument)
@specs.name('has_default')
def argument_has_default(method_argument):
    return method_argument.has_default
github openstack / yaql / yaql / standard_library / date_time.py View on Github external
@specs.yaql_property(DATETIME_TYPE)
def microsecond(dt):
    return dt.microsecond
github openstack / yaql / yaql / standard_library / date_time.py View on Github external
@specs.yaql_property(DATETIME_TYPE)
def second(dt):
    return dt.second
github openstack / yaql / yaql / standard_library / date_time.py View on Github external
@specs.yaql_property(yaqltypes.DateTime())
def date(dt):
    return DATETIME_TYPE(
        year=dt.year, month=dt.month, day=dt.day, tzinfo=dt.tzinfo)
github openstack / murano / murano / dsl / reflection.py View on Github external
@specs.yaql_property(dsl_types.MuranoMethodArgument)
@specs.name('declaring_method')
def argument_owner(method_argument):
    return method_argument.murano_method
github openstack / murano / murano / dsl / reflection.py View on Github external
@specs.yaql_property(dsl_types.MuranoPackage)
def types(murano_package):
    return tuple(
        murano_package.find_class(cls, False)
        for cls in murano_package.classes
    )
github openstack / murano / murano / dsl / reflection.py View on Github external
@specs.yaql_property(dsl_types.MuranoType)
@specs.name('name')
def type_name(murano_type):
    return murano_type.name
github openstack / yaql / yaql / standard_library / date_time.py View on Github external
@specs.yaql_property(DATETIME_TYPE)
def offset(dt):
    return dt.utcoffset() or ZERO_TIMESPAN