From 05c69e7ea3b5d9be09a664d9e362e4688648d9f4 Mon Sep 17 00:00:00 2001 From: Hanka Date: Thu, 25 Jun 2026 19:18:09 +0200 Subject: [PATCH 1/2] ci: add github workflow for linting --- .github/workflows/linting.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/linting.yaml diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml new file mode 100644 index 0000000..e225282 --- /dev/null +++ b/.github/workflows/linting.yaml @@ -0,0 +1,23 @@ +# .github/workflows/linting.yaml +name: Code Quality + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install dependencies + run: | + pip install flake8 black isort + - name: Run Black (formatting check) + run: black --check . + - name: Run isort (import sorting check) + run: isort --check-only . + - name: Run Flake8 (linting) + run: flake8 . --max-line-length=100 --ignore=E501,W503 \ No newline at end of file From d1fa37dc33068fb2f2642ef1e363e497e0dace5c Mon Sep 17 00:00:00 2001 From: Hanka Date: Thu, 25 Jun 2026 19:24:02 +0200 Subject: [PATCH 2/2] style: fix linting and formatting issues in app.py --- app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 2fc7751..3e5543f 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,7 @@ -from flask import Flask, render_template, request, jsonify import random +from flask import Flask, jsonify, render_template, request + app = Flask(__name__) @@ -96,7 +97,7 @@ def index(): @app.route("/move", methods=["POST"]) -def make_move(): +def move(): """ Handles player moves via POST requests. Receives the cell index from the request, makes the move, and returns the updated game state as JSON.