From 313a4358c2967d8e1fa82ec5814f77b9652f0aef Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Sat, 3 Feb 2024 19:38:44 +0900 Subject: [PATCH 1/2] use ruff for formatter --- .github/workflows/lint.yaml | 5 +++-- src/MySQLdb/connections.py | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 8e0e2947..95a95ac3 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,5 +10,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: psf/black@stable - - uses: chartboost/ruff-action@v1 + - run: pipx install ruff + - run: ruff check src/ + - run: ruff format src/ diff --git a/src/MySQLdb/connections.py b/src/MySQLdb/connections.py index 7456aeac..4fa762d4 100644 --- a/src/MySQLdb/connections.py +++ b/src/MySQLdb/connections.py @@ -193,7 +193,9 @@ class object, used to create cursors (keyword only) super().__init__(*args, **kwargs2) self.cursorclass = cursorclass self.encoders = { - k: v for k, v in conv.items() if type(k) is not int # noqa: E721 + k: v + for k, v in conv.items() + if type(k) is not int # noqa: E721 } self._server_version = tuple( From c76bf68108d0549b19ef3f075c1639b968039dcd Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Sat, 3 Feb 2024 19:40:22 +0900 Subject: [PATCH 2/2] disable codeql --- .github/workflows/codeql.yml | 37 ------------------------------------ 1 file changed, 37 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 075081b8..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: [ "main" ] - pull_request: - schedule: - - cron: "29 15 * * 6" - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - # with: - # languages: ${{ matrix.language }} - # queries: +security-and-quality - - # - name: Autobuild - # uses: github/codeql-action/autobuild@v2 - - - name: Build - run: | - python setup.py build_ext -if - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3