Skip to content

Commit aaebf87

Browse files
committed
Upgrade dependencies and ci
1 parent b8b6e91 commit aaebf87

File tree

9 files changed

+62
-143
lines changed

9 files changed

+62
-143
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
tags:
8-
- '**'
8+
- 'v*'
99
pull_request:
1010

1111
jobs:
@@ -14,13 +14,13 @@ jobs:
1414
name: lint ${{ matrix.python-version }}
1515
strategy:
1616
matrix:
17-
python-version: [ '3.10', '3.11', '3.12' ]
17+
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
1818
fail-fast: false
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121

2222
- name: Setup PDM
23-
uses: pdm-project/setup-pdm@v3
23+
uses: pdm-project/setup-pdm@v4
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
3+
rev: v5.0.0
44
hooks:
55
- id: end-of-file-fixer
66
- id: check-yaml
77
- id: check-toml
88

99
- repo: https://github.com/charliermarsh/ruff-pre-commit
10-
rev: v0.5.0
10+
rev: v0.9.9
1111
hooks:
1212
- id: ruff
1313
args:
1414
- '--fix'
15+
- '--unsafe-fixes'
1516
- id: ruff-format
1617

1718
- repo: https://github.com/pdm-project/pdm
18-
rev: 2.16.1
19+
rev: 2.22.3
1920
hooks:
2021
- id: pdm-lock-check

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
- [x] [Github](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
2828
- [X] [开源中国](https://www.oschina.net/openapi)
2929
- [ ] 阿里云
30-
- [ ] [Linux Do](https://connect.linux.do/)
30+
- [x] [Linux Do](https://connect.linux.do/)

example/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

example/main.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

fastapi_oauth20/__init__.py

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
"""在 FastAPI 中异步授权 OAuth2 客户端"""
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
from .clients.feishu import FeiShuOAuth20 as FeiShuOAuth20
4+
from .clients.gitee import GiteeOAuth20 as GiteeOAuth20
5+
from .clients.github import GitHubOAuth20 as GitHubOAuth20
6+
from .clients.google import GoogleOAuth20 as GoogleOAuth20
7+
from .clients.linuxdo import LinuxDoOAuth20 as LinuxDoOAuth20
8+
from .clients.oschina import OSChinaOAuth20 as OSChinaOAuth20
9+
from .integrations.fastapi import FastAPIOAuth20 as FastAPIOAuth20
210

311
__version__ = '0.0.1a2'
4-
5-
__all__ = [
6-
'OSChinaOAuth20',
7-
'GoogleOAuth20',
8-
'FeiShuOAuth20',
9-
'GiteeOAuth20',
10-
'GitHubOAuth20',
11-
'FastAPIOAuth20',
12-
'LinuxDoOAuth20',
13-
]
14-
15-
from .clients.feishu import FeiShuOAuth20
16-
from .clients.gitee import GiteeOAuth20
17-
from .clients.github import GitHubOAuth20
18-
from .clients.google import GoogleOAuth20
19-
from .clients.linuxdo import LinuxDoOAuth20
20-
from .clients.oschina import OSChinaOAuth20
21-
from .integrations.fastapi import OAuth20 as FastAPIOAuth20

fastapi_oauth20/integrations/fastapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from fastapi_oauth20.oauth20 import OAuth20Base
77

88

9-
class OAuth20:
9+
class FastAPIOAuth20:
1010
def __init__(
1111
self,
1212
client: OAuth20Base,

pdm.lock

Lines changed: 39 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fastapi_oauth20"
3-
description = "在 FastAPI 中异步授权 OAuth2 客户端"
3+
description = "在 FastAPI 中异步授权 OAuth 2.0 客户端"
44
dynamic = [
55
"version",
66
]
@@ -21,6 +21,7 @@ classifiers = [
2121
"Programming Language :: Python :: 3.10",
2222
"Programming Language :: Python :: 3.11",
2323
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
2425
"Topic :: Software Development :: Libraries",
2526
"Topic :: Software Development :: Libraries :: Python Modules",
2627
]
@@ -31,11 +32,8 @@ repository = "https://github.com/fastapi-practices/fastapi_oauth20"
3132

3233
[tool.pdm.dev-dependencies]
3334
lint = [
34-
"ruff>=0.2.0",
35-
"pre-commit>=3.6.0",
36-
]
37-
asgi = [
38-
"uvicorn>=0.27.0.post1",
35+
"ruff>=0.9.9",
36+
"pre-commit>=4.1.0",
3937
]
4038

4139
[tool.ruff]

0 commit comments

Comments
 (0)