Mercurial > libervia-backend
comparison sat_frontends/jp/constants.py @ 2624:56f94936df1e
code style reformatting using black
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 27 Jun 2018 20:14:46 +0200 |
parents | 12bf089f0bf3 |
children | b156b78b8f9a |
comparison
equal
deleted
inserted
replaced
2623:49533de4540b | 2624:56f94936df1e |
---|---|
24 class Const(constants.Const): | 24 class Const(constants.Const): |
25 | 25 |
26 APP_NAME = u"jp" | 26 APP_NAME = u"jp" |
27 PLUGIN_CMD = u"commands" | 27 PLUGIN_CMD = u"commands" |
28 PLUGIN_OUTPUT = u"outputs" | 28 PLUGIN_OUTPUT = u"outputs" |
29 OUTPUT_TEXT = u'text' # blob of unicode text | 29 OUTPUT_TEXT = u"text" # blob of unicode text |
30 OUTPUT_DICT = u'dict' # simple key/value dictionary | 30 OUTPUT_DICT = u"dict" # simple key/value dictionary |
31 OUTPUT_LIST = u'list' | 31 OUTPUT_LIST = u"list" |
32 OUTPUT_LIST_DICT = u'list_dict' # list of dictionaries | 32 OUTPUT_LIST_DICT = u"list_dict" # list of dictionaries |
33 OUTPUT_DICT_DICT = u'dict_dict' # dict of nested dictionaries | 33 OUTPUT_DICT_DICT = u"dict_dict" # dict of nested dictionaries |
34 OUTPUT_COMPLEX = u'complex' # complex data (e.g. multi-level dictionary) | 34 OUTPUT_COMPLEX = u"complex" # complex data (e.g. multi-level dictionary) |
35 OUTPUT_XML = u'xml' # XML node (as unicode string) | 35 OUTPUT_XML = u"xml" # XML node (as unicode string) |
36 OUTPUT_LIST_XML = u'list_xml' # list of XML nodes (as unicode strings) | 36 OUTPUT_LIST_XML = u"list_xml" # list of XML nodes (as unicode strings) |
37 OUTPUT_XMLUI = u'xmlui' # XMLUI as unicode string | 37 OUTPUT_XMLUI = u"xmlui" # XMLUI as unicode string |
38 OUTPUT_LIST_XMLUI = u'list_xmlui' # list of XMLUI (as unicode strings) | 38 OUTPUT_LIST_XMLUI = u"list_xmlui" # list of XMLUI (as unicode strings) |
39 OUTPUT_TYPES = (OUTPUT_TEXT, OUTPUT_DICT, OUTPUT_LIST, OUTPUT_LIST_DICT, OUTPUT_DICT_DICT, | 39 OUTPUT_TYPES = ( |
40 OUTPUT_COMPLEX, OUTPUT_XML, OUTPUT_LIST_XML, OUTPUT_XMLUI, OUTPUT_LIST_XMLUI) | 40 OUTPUT_TEXT, |
41 OUTPUT_DICT, | |
42 OUTPUT_LIST, | |
43 OUTPUT_LIST_DICT, | |
44 OUTPUT_DICT_DICT, | |
45 OUTPUT_COMPLEX, | |
46 OUTPUT_XML, | |
47 OUTPUT_LIST_XML, | |
48 OUTPUT_XMLUI, | |
49 OUTPUT_LIST_XMLUI, | |
50 ) | |
41 | 51 |
42 # Pubsub options flags | 52 # Pubsub options flags |
43 SERVICE = u'service' # service required | 53 SERVICE = u"service" # service required |
44 NODE = u'node' # node required | 54 NODE = u"node" # node required |
45 ITEM = u'item' # item required | 55 ITEM = u"item" # item required |
46 SINGLE_ITEM = u'single_item' # only one item is allowed | 56 SINGLE_ITEM = u"single_item" # only one item is allowed |
47 MULTI_ITEMS = u'multi_items' # multiple items are allowed | 57 MULTI_ITEMS = u"multi_items" # multiple items are allowed |
48 NO_MAX = u'no_max' # don't add --max option for multi items | 58 NO_MAX = u"no_max" # don't add --max option for multi items |
49 | 59 |
50 # ANSI | 60 # ANSI |
51 A_HEADER = A.BOLD + A.FG_YELLOW | 61 A_HEADER = A.BOLD + A.FG_YELLOW |
52 A_SUBHEADER = A.BOLD + A.FG_RED | 62 A_SUBHEADER = A.BOLD + A.FG_RED |
53 # A_LEVEL_COLORS may be used to cycle on colors according to depth of data | 63 # A_LEVEL_COLORS may be used to cycle on colors according to depth of data |
54 A_LEVEL_COLORS = (A_HEADER, A.BOLD + A.FG_BLUE, A.FG_MAGENTA, A.FG_CYAN) | 64 A_LEVEL_COLORS = (A_HEADER, A.BOLD + A.FG_BLUE, A.FG_MAGENTA, A.FG_CYAN) |
55 A_SUCCESS = A.BOLD + A.FG_GREEN | 65 A_SUCCESS = A.BOLD + A.FG_GREEN |
56 A_FAILURE = A.BOLD + A.FG_RED | 66 A_FAILURE = A.BOLD + A.FG_RED |
57 # A_PROMPT_* is for shell | 67 # A_PROMPT_* is for shell |
58 A_PROMPT_PATH = A.BOLD + A.FG_CYAN | 68 A_PROMPT_PATH = A.BOLD + A.FG_CYAN |
59 A_PROMPT_SUF = A.BOLD | 69 A_PROMPT_SUF = A.BOLD |
60 # Files | 70 # Files |
61 A_DIRECTORY = A.BOLD + A.FG_CYAN | 71 A_DIRECTORY = A.BOLD + A.FG_CYAN |
62 A_FILE = A.FG_WHITE | 72 A_FILE = A.FG_WHITE |
66 EXIT_ERROR = 1 # generic error, when nothing else match | 76 EXIT_ERROR = 1 # generic error, when nothing else match |
67 EXIT_BAD_ARG = 2 # arguments given by user are bad | 77 EXIT_BAD_ARG = 2 # arguments given by user are bad |
68 EXIT_BRIDGE_ERROR = 3 # can't connect to bridge | 78 EXIT_BRIDGE_ERROR = 3 # can't connect to bridge |
69 EXIT_BRIDGE_ERRBACK = 4 # something went wrong when calling a bridge method | 79 EXIT_BRIDGE_ERRBACK = 4 # something went wrong when calling a bridge method |
70 EXIT_NOT_FOUND = 16 # an item required by a command was not found | 80 EXIT_NOT_FOUND = 16 # an item required by a command was not found |
71 EXIT_DATA_ERROR = 17 # data needed for a command is invalid | 81 EXIT_DATA_ERROR = 17 # data needed for a command is invalid |
72 EXIT_USER_CANCELLED = 20 # user cancelled action | 82 EXIT_USER_CANCELLED = 20 # user cancelled action |
73 EXIT_FILE_NOT_EXE = 126 # a file to be executed was found, but it was not an executable utility (cf. man 1 exit) | 83 EXIT_FILE_NOT_EXE = ( |
84 126 | |
85 ) # a file to be executed was found, but it was not an executable utility (cf. man 1 exit) | |
74 EXIT_CMD_NOT_FOUND = 127 # a utility to be executed was not found (cf. man 1 exit) | 86 EXIT_CMD_NOT_FOUND = 127 # a utility to be executed was not found (cf. man 1 exit) |
75 EXIT_SIGNAL_INT = 128 # a command was interrupted by a signal (cf. man 1 exit) | 87 EXIT_SIGNAL_INT = 128 # a command was interrupted by a signal (cf. man 1 exit) |