From b996285ffd8415c7427ca58cd9d2021f5e24d5d3 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Tue, 8 Jan 2019 20:42:47 +0800 Subject: [PATCH] [Add] Add global setting file --- .pylintrc | 2 +- .style.yapf | 13 +++++++++++++ vnpy/trader/setting.py | 15 +++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 vnpy/trader/setting.py diff --git a/.pylintrc b/.pylintrc index dfa488fb..b03cd4ae 100644 --- a/.pylintrc +++ b/.pylintrc @@ -3,7 +3,7 @@ # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code. -extension-pkg-whitelist= +extension-pkg-whitelist=PyQt5 # Add files or directories to the blacklist. They should be base names, not # paths. diff --git a/.style.yapf b/.style.yapf index ab82e5ad..4db2d420 100644 --- a/.style.yapf +++ b/.style.yapf @@ -2,3 +2,16 @@ based_on_style = google split_before_logical_operator = true spaces_before_comment=2, 4 + +SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATED = true +SPLIT_ALL_COMMA_SEPARATED_VALUES = true +SPLIT_BEFORE_BITWISE_OPERATOR = true +SPLIT_BEFORE_CLOSING_BRACKET = true +SPLIT_BEFORE_DICT_SET_GENERATOR = true +SPLIT_BEFORE_DOT = true +SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true +SPLIT_BEFORE_FIRST_ARGUMENT = true +SPLIT_BEFORE_LOGICAL_OPERATOR = true +SPLIT_BEFORE_NAMED_ASSIGNS = true +SPLIT_COMPLEX_COMPREHENSION = true +DEDENT_CLOSING_BRACKETS = true \ No newline at end of file diff --git a/vnpy/trader/setting.py b/vnpy/trader/setting.py new file mode 100644 index 00000000..6cd288b4 --- /dev/null +++ b/vnpy/trader/setting.py @@ -0,0 +1,15 @@ +""" +Global setting of VN Trader. +""" + +from logging import CRITICAL + +SETTINGS = { + "font.family": "Arial", + "font.size": 12, + + "log.active": True, + "log.level": CRITICAL, + "log.console": True, + "log.file": True +} \ No newline at end of file