From cf0c394e6957a9a24d782da5be0801b2a7b33c9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 19:44:23 +0000 Subject: [PATCH 1/3] chore(deps): update setuptools requirement Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](https://github.com/pypa/setuptools/compare/v70.3.0...v83.0.0) --- updated-dependencies: - dependency-name: setuptools dependency-version: 83.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- requirements/requirements.build.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eac46be..7495c51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=70.3.0,<83.0.0", "setuptools-scm>=8.0.4,<11.0.0"] +requires = ["setuptools>=70.3.0,<84.0.0", "setuptools-scm>=8.0.4,<11.0.0"] build-backend = "setuptools.build_meta" [project] diff --git a/requirements/requirements.build.txt b/requirements/requirements.build.txt index d3bf1b2..8f9112f 100644 --- a/requirements/requirements.build.txt +++ b/requirements/requirements.build.txt @@ -1,4 +1,4 @@ -setuptools>=70.3.0,<83.0.0 +setuptools>=70.3.0,<84.0.0 wheel>=0.43.0,<1.0.0 build>=1.1.1,<2.0.0 twine>=6.0.1,<7.0.0 From ed8df051dd3a72210ca65a71458ec6a0a8d03fcc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 19:43:53 +0000 Subject: [PATCH 2/3] chore(deps): bump https://github.com/igorshubovych/markdownlint-cli Bumps [https://github.com/igorshubovych/markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) from v0.49.0 to 0.49.1. - [Release notes](https://github.com/igorshubovych/markdownlint-cli/releases) - [Commits](https://github.com/igorshubovych/markdownlint-cli/compare/v0.49.0...v0.49.1) --- updated-dependencies: - dependency-name: https://github.com/igorshubovych/markdownlint-cli dependency-version: 0.49.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ee9f93..a026a96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -113,7 +113,7 @@ repos: # --- Markdown --- - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.49.0 + rev: v0.49.1 hooks: - id: markdownlint name: "๐Ÿ“ markdownlint - Lint markdown files" From 47e560ba1271444d7c2ed366a97472dc400eb149 Mon Sep 17 00:00:00 2001 From: Batkhuu Byambajav Date: Thu, 23 Jul 2026 21:02:34 +0900 Subject: [PATCH 3/3] cicd: update Python action to v7 in workflows and add pre-commit checks --- .github/workflows/2.build-publish.yml | 4 +-- .github/workflows/pre-commit.yml | 44 +++++++++++++++++++++++++++ .github/workflows/publish-docs.yml | 2 +- .pre-commit-config.yaml | 34 +++++---------------- src/beans_logging/schemas.py | 2 +- 5 files changed, 56 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/2.build-publish.yml b/.github/workflows/2.build-publish.yml index b3c6385..b364270 100644 --- a/.github/workflows/2.build-publish.yml +++ b/.github/workflows/2.build-publish.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: "3.10" - name: Install dependencies @@ -43,7 +43,7 @@ jobs: git pull origin main echo "Current version: v$(./scripts/get-version.sh)" - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: "3.10" - name: Install dependencies diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..10fd5b9 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,44 @@ +name: Pre-Commit + +on: + pull_request: + branches: + - main + - dev + types: + - opened + - synchronize + - reopened + +jobs: + pre-commit: + name: Run pre-commit checks + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@v7 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: "3.10" + - name: Cache pip + uses: actions/cache@v6 + with: + path: ~/.cache/pip + key: pip-${{ runner.os }}-${{ hashFiles('requirements.txt') }} + - name: Install pre-commit and dependencies + run: | + python -m pip install -U pip + python -m pip install -r ./requirements.txt + python -m pip install -U pre-commit pyright pytest + - name: Cache pre-commit + uses: actions/cache@v6 + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + - name: Run pre-commit on all files + run: | + pre-commit run --all-files --show-diff-on-failure --color=always diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 46dacb5..d11be07 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -21,7 +21,7 @@ jobs: with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: "3.10" - name: Install dependencies diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a026a96..38e9333 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -153,38 +153,20 @@ repos: files: \.pyi?$ args: ["--skip=B101"] # skip assert-use warning - # - repo: https://github.com/RobertCraigie/pyright-python - # rev: v1.1.408 + # rev: v1.1.411 # hooks: # - id: pyright # name: "๐Ÿ pyright - Static type checker" # files: \.pyi?$ - # - repo: local - # hooks: - # - id: pyright - # name: "๐Ÿ pyright (local) - Static type checker" - # language: system - # entry: "python -m pyright" - # files: \.pyi?$ - - # --- Tests --- - # - repo: local - # hooks: - # - id: pytest-collect - # name: "๐Ÿงช pytest-collect (local) - Validate test formatting" - # language: system - # entry: "python -m pytest --collect-only" - # pass_filenames: false - # always_run: true - - # - id: pytest - # name: "๐Ÿงช pytest (local) - Run tests" - # language: system - # entry: "./scripts/test.sh -l -v -c" - # pass_filenames: false - # always_run: true + - repo: local + hooks: + - id: pyright + name: "๐Ÿ pyright (local) - Static type checker" + language: system + entry: "python -m pyright" + files: \.pyi?$ # --- Cleanup --- # - repo: local diff --git a/src/beans_logging/schemas.py b/src/beans_logging/schemas.py index 57a9a97..fde4997 100644 --- a/src/beans_logging/schemas.py +++ b/src/beans_logging/schemas.py @@ -113,7 +113,7 @@ class LoguruHandlerPM(ExtraBaseModel): class LogHandlerPM(LoguruHandlerPM): type_: LogHandlerTypeEnum = Field(default=LogHandlerTypeEnum.UNKNOWN) - sink: _SinkType | None = Field(default=None) + sink: _SinkType | None = Field(default=None) # type: ignore level: str | int | LogLevelEnum | None = Field(default=None) custom_serialize: bool | None = Field(default=None) error: bool = Field(default=False)