From fa4e532b1f9b8fffa1b2be0cc9c3c71f78a45aeb Mon Sep 17 00:00:00 2001 From: lchen-2101 <73617864+lchen-2101@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:55:54 -0400 Subject: [PATCH] feat: test black and ruff config --- .github/workflows/linters.yml | 6 +++++- pyproject.toml | 32 +++++++++++++++++--------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 3387d0b..2f24298 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -3,9 +3,13 @@ name: Linters on: [push] jobs: - linting: + black: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: psf/black@stable + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - uses: chartboost/ruff-action@v1 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fc88790..d2412b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "" authors = ["lchen-2101 <73617864+lchen-2101@users.noreply.github.com>"] readme = "README.md" -packages = [{include = "regtech-user-fi-management"}] +packages = [{ include = "regtech-user-fi-management" }] [tool.poetry.dependencies] python = "^3.11" @@ -30,22 +30,24 @@ pytest-mock = "^3.11.1" [tool.pytest.ini_options] asyncio_mode = "auto" -pythonpath = [ - "src" -] +pythonpath = ["src"] addopts = [ - "--cov-report=term-missing", - "--cov-branch", - "--cov-report=xml", - "--cov-report=term", - "--cov=src", - "-vv", - "--strict-markers", - "-rfE", -] -testpaths = [ - "tests", + "--cov-report=term-missing", + "--cov-branch", + "--cov-report=xml", + "--cov-report=term", + "--cov=src", + "-vv", + "--strict-markers", + "-rfE", ] +testpaths = ["tests"] + +[tool.black] +line-length = 120 + +[tool.ruff] +line-length = 120 [tool.coverage.run] relative_files = true