diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 3a986c2..0000000 --- a/.flake8 +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -max-line-length = 125 -exclude = .gitignore,venv diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml deleted file mode 100644 index ccc996d..0000000 --- a/.github/workflows/black.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Formatting validation using black - -on: - push: - branches: [main] - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 5 - strategy: - matrix: - python-version: ["3.13"] - - steps: - - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - pip install -U pip - pip install -r requirements.txt - - name: Format with black - run: | - black . - if git status --porcelain | grep .; then git --no-pager diff; exit 1; fi diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml deleted file mode 100644 index e3a2739..0000000 --- a/.github/workflows/flake8.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Linting validation using flake8 - -on: - push: - branches: [main] - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 5 - strategy: - matrix: - python-version: ["3.13"] - - steps: - - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - pip install -U pip - pip install -r requirements.txt - - name: Lint with flake8 - run: | - flake8 *.py && flake8 listeners/ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8c3ab20..b974532 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,8 +1,9 @@ -name: Run unit tests +name: Tests on: push: - branches: [main] + branches: + - main pull_request: jobs: @@ -11,8 +12,11 @@ jobs: timeout-minutes: 5 strategy: matrix: - python-version: ["3.11", "3.12", "3.13"] - + python-version: + - "3.11" + - "3.12" + - "3.13" + - "3.14" steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} @@ -23,6 +27,10 @@ jobs: run: | pip install -U pip pip install -r requirements.txt + - name: Lint and check formatting + run: | + ruff check . + ruff format --check . - name: Run all tests run: | pytest . -v diff --git a/README.md b/README.md index c8c7680..48acdfd 100644 --- a/README.md +++ b/README.md @@ -45,11 +45,11 @@ python3 app.py #### Linting ```zsh -# Run flake8 from root directory for linting -flake8 *.py && flake8 listeners/ +# Run ruff from root directory for linting +ruff check . -# Run black from root directory for code formatting -black . +# Run ruff from root directory for code formatting +ruff format . ``` #### Testing diff --git a/pyproject.toml b/pyproject.toml index b007a65..b800495 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,9 @@ -[tool.black] +[tool.ruff] line-length = 125 +exclude = [".venv", "venv"] + +[tool.ruff.format] +quote-style = "double" [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/requirements.txt b/requirements.txt index ee008ea..70d0ded 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -slack-bolt==1.27.0 pytest==9.0.2 -flake8==7.3.0 -black==25.12.0 +ruff==0.9.4 +slack-bolt==1.27.0