sudoblockio / tackle

Tackle is a programmable configuration language for building modular utilities, code generators, and CLIs with schema validation baked in.
Apache License 2.0
51 stars 2 forks source link

Reserved Fields #243

Open robcxyz opened 8 months ago

robcxyz commented 8 months ago

Reserved Fields

Change the syntax of reserved fields to reduce potential conflicts

Overview

Variable Rules

Variables

Reserved

is_public: bool = False

args: list = []

kwargs: Union[str, dict] = None

kwargs: str = None

New

argsseperator: str = None

V2 - 1

ispublic: bool = False

args_: list = []

kwargs_: str = None

V2 - 1

_is_public: bool = False

args: list = []

_kwargs: str = None

env_: Any = None

skip_output: bool = False

_render_exclude_default: set = {

'input_context',

'public_context',

'hook_type',

'else',

}

_render_exclude: set = {}

_render_by_default: list = []

Private

Used when rendering docs**

_doc_tags: list = []

_issue_numbers: list = [] - TODO: Implement this

_notes: list = []

_docs_order: int = 10 - Arbitrary high number so hooks can be sorted high or low

_return_description: str = None

_wip: bool = False


from tackle import BaseHook, HookConfig

from pydantic import ConfigDict

class SomeHook(BaseHook):

    hook_name = 'foo'

    bar: str

    model_config = ConfigDict(

        extra='forbid',

    )

    hook_config: HookConfig = HookConfig(

        args=['bar'],

    )

foo<-:

  bar: str

  Config: