From 523d4d064f7d9727f911fe5e011561b5ad7a986c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 11 Sep 2026 01:00:39 +0000 Subject: [PATCH 1/2] Initial plan From c0cfb7df9b8d4b30854e234564482101b773f6e2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 11 Sep 2026 01:02:45 +0000 Subject: [PATCH 2/2] Add pre-commit flake8 style checks Co-authored-by: alifa98 <31096694+alifa98@users.noreply.github.com> --- .pre-commit-config.yaml | 10 ++++++++++ README.md | 11 +++++++++++ requirements-dev.txt | 1 + 3 files changed, 22 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..1f6e40f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: + - repo: https://github.com/pycqa/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + args: + - --count + - --max-complexity=10 + - --max-line-length=127 + - --statistics diff --git a/README.md b/README.md index a47ffea..7848b7b 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,17 @@ To test the package, you can use the following command: pytest ``` +To enable style checks before every commit, install the development dependencies and +set up the git pre-commit hook: + +```bash +pip install -r requirements-dev.txt +pre-commit install +``` + +Then pre-commit will run `flake8` as a check-only step. It reports failures and +does not automatically rewrite files. + ## How can I contact you? You can open a new discussion in this repository's [Discussion](https://github.com/alifa98/GameKit/discussions) section for any question. diff --git a/requirements-dev.txt b/requirements-dev.txt index 50d197e..e41f6b7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ build==0.10.0 flake8==6.0.0 +pre-commit==3.8.0 pytest==7.4.0 twine==4.0.2