From 726089b2d8c7861fe7257af282e1bd5644f7bcd9 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 18 Jan 2019 01:28:04 -0400 Subject: [PATCH 1/2] [Mod] move travis/ into tools/ci --- .travis.yml | 4 ++-- {travis => tools/ci}/format_check.py | 0 {travis => tools/ci}/requirements.txt | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename {travis => tools/ci}/format_check.py (100%) rename {travis => tools/ci}/requirements.txt (100%) diff --git a/.travis.yml b/.travis.yml index fa0ffea0..09c3f2ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,10 @@ python: - "3.7-dev" install: - pip install -r requirements.txt - - pip install -r travis/requirements.txt + - pip install -r tools/ci/requirements.txt - pip install -r requirements-dev.txt # command to run tests script: - - python travis/format_check.py + - python tools/ci/format_check.py - pylint --rcfile=.pylintrc vnpy - python tests/test_all.py diff --git a/travis/format_check.py b/tools/ci/format_check.py similarity index 100% rename from travis/format_check.py rename to tools/ci/format_check.py diff --git a/travis/requirements.txt b/tools/ci/requirements.txt similarity index 100% rename from travis/requirements.txt rename to tools/ci/requirements.txt From 74de2f77b57c24cfe1f591ba20dea531eb3974f2 Mon Sep 17 00:00:00 2001 From: nanoric Date: Sat, 19 Jan 2019 02:36:17 -0400 Subject: [PATCH 2/2] =?UTF-8?q?[Mod]=20=E6=B6=88=E9=99=A4pylint=E5=AF=B9En?= =?UTF-8?q?um=E7=9A=84=E6=8A=B1=E6=80=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pylintrc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.pylintrc b/.pylintrc index 2c469c4b..abfc0bfe 100644 --- a/.pylintrc +++ b/.pylintrc @@ -121,9 +121,10 @@ never-returning-functions=sys.exit # Regular expression matching correct argument names. Overrides argument- # naming-style. -argument-rgx=^[a-z][a-z0-9_]*$ +argument-rgx=^[_a-z][a-z0-9_]*$ # Naming style matching correct attribute names. +# self.xxxx attr-naming-style=snake_case # Regular expression matching correct attribute names. Overrides attr-naming- @@ -139,11 +140,13 @@ bad-names=foo, tata # Naming style matching correct class attribute names. -class-attribute-naming-style=snake_case +#class-attribute-naming-style= # Regular expression matching correct class attribute names. Overrides class- # attribute-naming-style. -#class-attribute-rgx= +# ClassA.XXXX +# except that dataclass should be snake_case +class-attribute-rgx=^([A-Z][A-Z_]+|[_a-z][a-z0-9_]+)$ # Naming style matching correct class names. class-naming-style=PascalCase @@ -157,7 +160,8 @@ class-naming-style=PascalCase # Regular expression matching correct constant names. Overrides const-naming- # style. -const-rgx=(([A-Z_][A-Za-z0-9_]*)|(__.*__))$ +const-rgx=^([A-Z][A-Z0-9_]+|[a-z][a-z0-9_]+|__\w+__)$ + # Minimum line length for functions/classes that require docstrings, shorter # ones are exempt. @@ -182,11 +186,11 @@ good-names=i, include-naming-hint=yes # Naming style matching correct inline iteration names. -inlinevar-naming-style=any +#inlinevar-naming-style=any # Regular expression matching correct inline iteration names. Overrides # inlinevar-naming-style. -#inlinevar-rgx= +inlinevar-rgx=^[a-z][a-z0-9_]*$ # Naming style matching correct method names. method-naming-style=snake_case