Merge branch 'dev' of https://github.com/vnpy/vnpy into dev

This commit is contained in:
vn.py 2018-08-28 22:49:53 +08:00
commit 0aec6c90be
3 changed files with 15 additions and 21 deletions

View File

@ -4,10 +4,6 @@ cache: pip
python: python:
- 2.7 - 2.7
- 3.6 - 3.6
branches:
only:
- master
- dev
install: install:
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install flake8 # pytest # add another testing frameworks later - pip install flake8 # pytest # add another testing frameworks later
@ -15,7 +11,7 @@ before_script:
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - flake8 . --count --exit-zero --ignore=E265,W2 --max-complexity=10 --max-line-length=127 --statistics
script: script:
- true # pytest --capture=sys # add other tests here - true # pytest --capture=sys # add other tests here
notifications: notifications:

View File

@ -43,7 +43,7 @@ setup(
license='MIT', license='MIT',
url='http://www.vnpy.org', url='http://www.vnpy.org',
description='A framework for developing Quantitative Trading programmes', description='A framework for developing Quantitative Trading programmes',
long_description = __doc__, long_description=__doc__,
keywords='quant quantitative investment trading algotrading', keywords='quant quantitative investment trading algotrading',
classifiers=['Development Status :: 4 - Beta', classifiers=['Development Status :: 4 - Beta',
'Operating System :: Microsoft :: Windows :: Windows 7', 'Operating System :: Microsoft :: Windows :: Windows 7',
@ -60,7 +60,4 @@ setup(
'*.h', '*.cpp', '*.bash', '*.txt', '*.h', '*.cpp', '*.bash', '*.txt',
'*.dll', '*.lib', '*.so', '*.pyd', '*.dll', '*.lib', '*.so', '*.pyd',
'*.dat', '*.ini', '*.pfx', '*.scc', '*.crt', '*.key']}, '*.dat', '*.ini', '*.pfx', '*.scc', '*.crt', '*.key']},
extras_require={ extras_require={'tq': ["tornado>=4.5.1", "sortedcontainers>=1.5.7"]})
'tq': ["tornado>=4.5.1", "sortedcontainers>=1.5.7"],
}
)

View File

@ -108,7 +108,7 @@ class CtpGateway(VtGateway):
def connect(self): def connect(self):
"""连接""" """连接"""
try: try:
f = file(self.filePath) f = open(self.filePath)
except IOError: except IOError:
log = VtLogData() log = VtLogData()
log.gatewayName = self.gatewayName log.gatewayName = self.gatewayName
@ -118,6 +118,7 @@ class CtpGateway(VtGateway):
# 解析json文件 # 解析json文件
setting = json.load(f) setting = json.load(f)
f.close()
try: try:
userID = str(setting['userID']) userID = str(setting['userID'])
password = str(setting['password']) password = str(setting['password'])