From a267f63732417ad2a94e78e4e09c475e3e35384e Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Wed, 9 Oct 2019 16:28:16 +0800 Subject: [PATCH] [Mod] flake8 code quality improve --- vnpy/gateway/ctp/ctp_gateway.py | 8 ++++---- vnpy/gateway/ctptest/ctptest_gateway.py | 8 ++++---- vnpy/trader/rqdata.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vnpy/gateway/ctp/ctp_gateway.py b/vnpy/gateway/ctp/ctp_gateway.py index 32959767..c69bb1d5 100644 --- a/vnpy/gateway/ctp/ctp_gateway.py +++ b/vnpy/gateway/ctp/ctp_gateway.py @@ -156,14 +156,14 @@ class CtpGateway(BaseGateway): product_info = setting["产品信息"] if ( - (not td_address.startswith("tcp://")) and - (not td_address.startswith("ssl://")) + (not td_address.startswith("tcp://")) + and (not td_address.startswith("ssl://")) ): td_address = "tcp://" + td_address if ( - (not md_address.startswith("tcp://")) and - (not md_address.startswith("ssl://")) + (not md_address.startswith("tcp://")) + and (not md_address.startswith("ssl://")) ): md_address = "tcp://" + md_address diff --git a/vnpy/gateway/ctptest/ctptest_gateway.py b/vnpy/gateway/ctptest/ctptest_gateway.py index 1d109eae..3d83dd8d 100644 --- a/vnpy/gateway/ctptest/ctptest_gateway.py +++ b/vnpy/gateway/ctptest/ctptest_gateway.py @@ -156,14 +156,14 @@ class CtptestGateway(BaseGateway): product_info = setting["产品信息"] if ( - (not td_address.startswith("tcp://")) and - (not td_address.startswith("ssl://")) + (not td_address.startswith("tcp://")) + and (not td_address.startswith("ssl://")) ): td_address = "tcp://" + td_address if ( - (not md_address.startswith("tcp://")) and - (not md_address.startswith("ssl://")) + (not md_address.startswith("tcp://")) + and (not md_address.startswith("ssl://")) ): md_address = "tcp://" + md_address diff --git a/vnpy/trader/rqdata.py b/vnpy/trader/rqdata.py index 1feed7a0..0e793952 100644 --- a/vnpy/trader/rqdata.py +++ b/vnpy/trader/rqdata.py @@ -50,7 +50,7 @@ class RqdataClient: return False rqdata_init( - self.username, + self.username, self.password, ('rqdatad-pro.ricequant.com', 16011), use_pool=True