mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-14 18:12:35 +08:00
use ruff for formatter (#691)
This commit is contained in:
37
.github/workflows/codeql.yml
vendored
37
.github/workflows/codeql.yml
vendored
@ -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
|
5
.github/workflows/lint.yaml
vendored
5
.github/workflows/lint.yaml
vendored
@ -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/
|
||||
|
@ -193,7 +193,9 @@ class Connection(_mysql.connection):
|
||||
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(
|
||||
|
Reference in New Issue
Block a user