Skip to content

Commit

Permalink
docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgar committed Sep 21, 2019
1 parent 38a2d4e commit fcfdae6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
20 changes: 20 additions & 0 deletions PyFlow/Core/Common.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,20 @@ class Direction(IntEnum):


class PinSpecifires:
"""Pin specifires constants
:var SUPPORTED_DATA_TYPES: To specify supported data types list
:var CONSTRAINT: To specify type constraint key
:var STRUCT_CONSTRAINT: To specify struct constraint key
:var ENABLED_OPTIONS: To enable options
:var DISABLED_OPTIONS: To disable options
:var INPUT_WIDGET_VARIANT: To specify widget variant string
:var DESCRIPTION: To specify description for pin, which will be used as tooltip
:var VALUE_LIST: Specific for string pin. If specified, combo box will be created
:var VALUE_RANGE: Specific for ints and floats. If specified, slider will be created instead of value box
:var DRAGGER_STEPS: To specify custom value dragger steps
"""

SUPPORTED_DATA_TYPES = "supportedDataTypes"
CONSTRAINT = "constraint"
STRUCT_CONSTRAINT = "structConstraint"
Expand All @@ -853,6 +867,12 @@ class PinSpecifires:


class NodeMeta:
"""Node meta constants
:var CATEGORY: To specify category for node. Will be considered by node box
:var KEYWORDS: To specify list of additional keywords, used in node box search field
:var CACHE_ENABLED: To specify if node is cached or not
"""
CATEGORY = "Category"
KEYWORDS = "Keywords"
CACHE_ENABLED = "CacheEnabled"
8 changes: 7 additions & 1 deletion PyFlow/Core/FunctionLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,15 @@ def clock():
>>> (PinSpecifires.ENABLED_OPTIONS: None)
>>> (PinSpecifires.DISABLED_OPTIONS: None)
>>> (PinSpecifires.INPUT_WIDGET_VARIANT: "DefaultWidget")
>>> (PinSpecifires.DESCRIPTION: str)
>>> (PinSpecifires.VALUE_LIST: [str])
>>> (PinSpecifires.VALUE_RANGE: (int|float, int|float))
>>> (PinSpecifires.DRAGGER_STEPS: [int|float])
Value list is specific for string pins. If Specified - enum input widget will be created for this pin.
If value range is specified, slider will be created in property view instead of value box.
Dragger steps is a list of values which will be used in value dragger (middle mouse button).
"Value list is specific for string pins. If Specified - enum input widget will be created for this pin."
node meta
dict that describes different node options and attributes to be considered on generation
Expand Down

0 comments on commit fcfdae6

Please sign in to comment.