diff --git a/.github/workflows/black_formatting.yml b/.github/workflows/black_formatting.yml new file mode 100644 index 0000000..fac9795 --- /dev/null +++ b/.github/workflows/black_formatting.yml @@ -0,0 +1,22 @@ +name: Code Formatting Check + +on: + push: + branches: [ main, develop, fix-read-me ] + pull_request: + branches: [ main, develop ] + +jobs: + black-formatting: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check code formatting with Black + uses: psf/black@stable + with: + options: "--check --diff" + src: "." + version: "~= 24.0" \ No newline at end of file diff --git a/portfolio.py b/portfolio.py index 6bf2950..bfb4cb9 100644 --- a/portfolio.py +++ b/portfolio.py @@ -11,7 +11,7 @@ class Portfolio: def __init__(self): - self.symbols = ["IBM","QBTS"] + self.symbols = ["IBM", "QBTS"] self.time_frame = 60 def get_stock(self, symbols, time_frame): @@ -58,7 +58,7 @@ def data_clean(self): clean_data = self.data_extract(data) all_dfs.append(clean_data) df = pl.DataFrame([all_dfs]) - + print(df) return df diff --git a/pyproject.toml b/pyproject.toml index 4a78756..f01dff1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,3 +11,21 @@ dependencies = [ "scipy==1.16.1", "seaborn==0.13.2", ] +[tool.black] +line-length = 88 +target-version = ['py313'] +include = '\.pyi?$' +exclude = ''' +/( + \.eggs + | \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist +)/ +''' \ No newline at end of file