Skip to content

Commit

Permalink
optimize pylint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetWolf committed Oct 12, 2023
1 parent bbf47df commit 0401298
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_qlib_from_source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ jobs:
# We use sys.setrecursionlimit(2000) to make the recursion depth larger to ensure that pylint works properly (the default recursion depth is 1000).
- name: Check Qlib with pylint
run: |
pylint --disable=C0104,C0114,C0115,C0116,C0301,C0302,C0411,C0413,C1802,R0401,R0801,R0902,R0903,R0911,R0912,R0913,R0914,R0915,R1720,W0105,W0123,W0201,W0511,W0613,W1113,W1514,E0401,E1121,C0103,C0209,R0402,R1705,R1710,R1725,R1735,W0102,W0212,W0221,W0223,W0231,W0237,W0612,W0621,W0622,W0703,W1309,E1102,E1136 --const-rgx='[a-z_][a-z0-9_]{2,30}$' qlib --init-hook "import astroid; astroid.context.InferenceContext.max_inferred = 500; import sys; sys.setrecursionlimit(2000)"
pylint --disable=C0104,C0114,C0115,C0116,C0301,C0302,C0411,C0413,C1802,R0401,R0801,R0902,R0903,R0911,R0912,R0913,R0914,R0915,R1720,W0105,W0123,W0201,W0511,W0613,W1113,W1514,E0401,E1121,C0103,C0209,R0402,R1705,R1710,R1725,R1735,W0102,W0212,W0221,W0223,W0231,W0237,W0612,W0621,W0622,W0703,W1309,E1102,E1136 --const-rgx='[a-z_][a-z0-9_]{2,30}$' scripts --init-hook "import astroid; astroid.context.InferenceContext.max_inferred = 500; import sys; sys.setrecursionlimit(2000)"
pylint --disable=F0002,C0104,C0114,C0115,C0116,C0301,C0302,C0411,C0413,C1802,R0401,R0801,R0902,R0903,R0911,R0912,R0913,R0914,R0915,R1720,W0105,W0123,W0201,W0511,W0613,W1113,W1514,E0401,E1121,C0103,C0209,R0402,R1705,R1710,R1725,R1735,W0102,W0212,W0221,W0223,W0231,W0237,W0612,W0621,W0622,W0703,W1309,E1102,E1136 --const-rgx='[a-z_][a-z0-9_]{2,30}$' qlib --init-hook "import astroid; astroid.context.InferenceContext.max_inferred = 500; import sys; sys.setrecursionlimit(2000)"
pylint --disable=F0002,C0104,C0114,C0115,C0116,C0301,C0302,C0411,C0413,C1802,R0401,R0801,R0902,R0903,R0911,R0912,R0913,R0914,R0915,R1720,W0105,W0123,W0201,W0511,W0613,W1113,W1514,E0401,E1121,C0103,C0209,R0402,R1705,R1710,R1725,R1735,W0102,W0212,W0221,W0223,W0231,W0237,W0246,W0612,W0621,W0622,W0703,W1309,E1102,E1136 --const-rgx='[a-z_][a-z0-9_]{2,30}$' scripts --init-hook "import astroid; astroid.context.InferenceContext.max_inferred = 500; import sys; sys.setrecursionlimit(2000)"
# The following flake8 error codes were ignored:
# E501 line too long
Expand Down
6 changes: 3 additions & 3 deletions scripts/data_collector/crypto/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _get_calendar_list(self):


class Run(BaseRun):
def __init__(self, source_dir=None, normalize_dir=None, max_workers=1, interval="1d"): # pylint: disable=W0246
def __init__(self, source_dir=None, normalize_dir=None, max_workers=1, interval="1d"):
"""
Parameters
Expand Down Expand Up @@ -253,7 +253,7 @@ def normalize_class_name(self):
def default_base_dir(self) -> [Path, str]:
return CUR_DIR

def download_data( # pylint: disable=W0246
def download_data(
self,
max_collector_count=2,
delay=0,
Expand Down Expand Up @@ -289,7 +289,7 @@ def download_data( # pylint: disable=W0246

super(Run, self).download_data(max_collector_count, delay, start, end, check_data_length, limit_nums)

def normalize_data(self, date_field_name: str = "date", symbol_field_name: str = "symbol"): # pylint: disable=W0246
def normalize_data(self, date_field_name: str = "date", symbol_field_name: str = "symbol"):
"""normalize data
Parameters
Expand Down
4 changes: 2 additions & 2 deletions scripts/data_collector/fund/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def normalize_class_name(self):
def default_base_dir(self) -> [Path, str]:
return CUR_DIR

def download_data( # pylint: disable=W0246
def download_data(
self,
max_collector_count=2,
delay=0,
Expand Down Expand Up @@ -283,7 +283,7 @@ def download_data( # pylint: disable=W0246

super(Run, self).download_data(max_collector_count, delay, start, end, check_data_length, limit_nums)

def normalize_data(self, date_field_name: str = "date", symbol_field_name: str = "symbol"): # pylint: disable=W0246
def normalize_data(self, date_field_name: str = "date", symbol_field_name: str = "symbol"):
"""normalize data
Parameters
Expand Down

0 comments on commit 0401298

Please sign in to comment.