Skip to content

Commit

Permalink
fix: fix pytest bug of failed test gotrue client in trio,
Browse files Browse the repository at this point in the history
feat: add crud test
  • Loading branch information
AtticusZeller committed Jan 12, 2024
1 parent 59d9d45 commit 0d22fb1
Show file tree
Hide file tree
Showing 15 changed files with 201 additions and 358 deletions.
150 changes: 89 additions & 61 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,70 +1,98 @@
exclude: '^.*\.(md|MD|xml|yml|yaml|json|ini|cfg|txt)$|^\.idea/'
exclude: '^.*\.(md|MD|xml|ini|cfg|txt)$|^\.idea/'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
# 删除行尾空格
- id: check-added-large-files
# 检查是否有大文件被错误地添加到git
- id: end-of-file-fixer
# 确保文件以一个空行结尾
- id: mixed-line-ending
# 统一文件的行结束符(例如,将CRLF转换为LF)
args: ["--fix=lf"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
# 检查YAML文件是否格式正确
- id: check-json
# 检查JSON文件是否格式正确
- id: trailing-whitespace
# 删除行尾空格
- id: check-added-large-files
# 检查是否有大文件被错误地添加到git
- id: end-of-file-fixer
# 确保文件以一个空行结尾
- id: mixed-line-ending
# 统一文件的行结束符(例如,将CRLF转换为LF)
args: [ "--fix=lf" ]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
# 对Python的import语句进行排序和格式化
args:
[
"--profile",
"black",
"--multi-line=3",
"--trailing-comma",
"--force-grid-wrap=0",
"--use-parentheses",
"--line-width=88",
]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
files: \.(py|sh|rst|yml|yaml)$

- repo: https://github.com/myint/autoflake.git
rev: v2.2.1
hooks:
- id: autoflake
# 移除未使用的导入和变量
args:
[
"--in-place",
"--remove-all-unused-imports",
"--ignore-init-module-imports",
]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
# 对Python的import语句进行排序和格式化
args:
[
"--profile",
"black",
"--multi-line=3",
"--trailing-comma",
"--force-grid-wrap=0",
"--use-parentheses",
"--line-width=88",
]

- repo: https://github.com/psf/black
rev: "23.12.1"
hooks:
- id: black
# 自动格式化Python代码,符合PEP 8风格指南
- repo: https://github.com/myint/autoflake.git
rev: v2.2.1
hooks:
- id: autoflake
# 移除未使用的导入和变量
args:
[
"--in-place",
"--remove-all-unused-imports",
"--ignore-init-module-imports",
]

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
# 将Python代码升级到新版本的Python语法
args: ["--py310-plus"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
# 将Python代码升级到新版本的Python语法
args: [ "--py310-plus" ]

- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
# 确保commit信息遵循Conventional Commits标准
stages: [commit-msg]
- repo: https://github.com/psf/black
rev: "23.12.1"
hooks:
- id: black
# 自动格式化Python代码,符合PEP 8风格指南
args: [--line-length=88]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
args: [--ignore-missing-imports,--disallow-untyped-defs, --show-error-codes ]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
# 确保commit信息遵循Conventional Commits标准
stages: [ commit-msg ]

- repo: 'https://github.com/PyCQA/flake8'
rev: 7.0.0
hooks:
- id: flake8
args:
- '--max-line-length=88'
- '--ignore=E203,W503,F401'
language: python
types: [ python ]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
args: [ --ignore-missing-imports,--disallow-untyped-defs, --show-error-codes ]
# additional_dependencies: [ types-requests, types-setuptools ] # 如果需要额外的类型存根

ci:
# Settings for the https://pre-commit.ci/ continuous integration service
autofix_prs: false
# Default message is more verbose
autoupdate_commit_msg: '[pre-commit.ci] autoupdate'
# Default is weekly
autoupdate_schedule: monthly
Loading

0 comments on commit 0d22fb1

Please sign in to comment.