Skip to content

Commit

Permalink
Fix CI pylint bug (microsoft#1270)
Browse files Browse the repository at this point in the history
* Fix CI pylint bug

* Update log.py
  • Loading branch information
you-n-g committed Aug 30, 2022
1 parent 5b6c104 commit 7cc5df1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions qlib/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
class MetaLogger(type):
def __new__(mcs, name, bases, attrs): # pylint: disable=C0204
wrapper_dict = logging.Logger.__dict__.copy()
for key in wrapper_dict:
for key, val in wrapper_dict.items():
if key not in attrs and key != "__reduce__":
attrs[key] = wrapper_dict[key]
attrs[key] = val
return type.__new__(mcs, name, bases, attrs)


Expand Down
4 changes: 2 additions & 2 deletions qlib/tests/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _download_data(
target_path = target_dir.joinpath(_target_file_name)

url = self.merge_remote_url(file_name, dataset_version)
resp = requests.get(url, stream=True)
resp = requests.get(url, stream=True, timeout=60)
resp.raise_for_status()
if resp.status_code != 200:
raise requests.exceptions.HTTPError()
Expand All @@ -69,7 +69,7 @@ def _download_data(

def check_dataset(self, file_name: str, dataset_version: str = None):
url = self.merge_remote_url(file_name, dataset_version)
resp = requests.get(url, stream=True)
resp = requests.get(url, stream=True, timeout=60)
status = True
if resp.status_code == 404:
status = False
Expand Down

0 comments on commit 7cc5df1

Please sign in to comment.