diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e90585159..e2f93d05c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: pyupgrade args: [--py37-plus] - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black - repo: https://github.com/PyCQA/flake8 diff --git a/finrl/agents/elegantrl/models.py b/finrl/agents/elegantrl/models.py index 5e6cd56d4..e0b45cb54 100644 --- a/finrl/agents/elegantrl/models.py +++ b/finrl/agents/elegantrl/models.py @@ -1,6 +1,7 @@ """ DRL models from ElegantRL: https://github.com/AI4Finance-Foundation/ElegantRL """ + from __future__ import annotations import torch diff --git a/finrl/agents/portfolio_optimization/models.py b/finrl/agents/portfolio_optimization/models.py index d1a07cc90..a2c0c01ca 100644 --- a/finrl/agents/portfolio_optimization/models.py +++ b/finrl/agents/portfolio_optimization/models.py @@ -2,6 +2,7 @@ DRL models to solve the portfolio optimization task with reinforcement learning. This agent was developed to work with environments like PortfolioOptimizationEnv. """ + from __future__ import annotations from .algorithms import PolicyGradient diff --git a/finrl/meta/data_processors/processor_yahoofinance.py b/finrl/meta/data_processors/processor_yahoofinance.py index 3f9128c85..bb66b9a94 100644 --- a/finrl/meta/data_processors/processor_yahoofinance.py +++ b/finrl/meta/data_processors/processor_yahoofinance.py @@ -1,4 +1,5 @@ """Reference: https://github.com/AI4Finance-LLC/FinRL""" + from __future__ import annotations import datetime diff --git a/finrl/meta/env_portfolio_optimization/env_portfolio_optimization.py b/finrl/meta/env_portfolio_optimization/env_portfolio_optimization.py index 533d56ce5..85355fb4a 100644 --- a/finrl/meta/env_portfolio_optimization/env_portfolio_optimization.py +++ b/finrl/meta/env_portfolio_optimization/env_portfolio_optimization.py @@ -1,4 +1,5 @@ """From FinRL https://github.com/AI4Finance-LLC/FinRL/tree/master/finrl/env""" + from __future__ import annotations import math diff --git a/finrl/meta/preprocessor/tusharedownloader.py b/finrl/meta/preprocessor/tusharedownloader.py index 12941b041..1c271a937 100644 --- a/finrl/meta/preprocessor/tusharedownloader.py +++ b/finrl/meta/preprocessor/tusharedownloader.py @@ -1,6 +1,7 @@ """Contains methods and classes to collect data from tushare API """ + from __future__ import annotations import pandas as pd diff --git a/finrl/meta/preprocessor/yahoodownloader.py b/finrl/meta/preprocessor/yahoodownloader.py index 66eb0c2e3..cfefd7f4c 100644 --- a/finrl/meta/preprocessor/yahoodownloader.py +++ b/finrl/meta/preprocessor/yahoodownloader.py @@ -1,6 +1,7 @@ """Contains methods and classes to collect data from Yahoo Finance API """ + from __future__ import annotations import pandas as pd