Skip to content

Commit b514a57

Browse files
authored
Merge pull request #194 from MerleLiuKun/feat-dependency
feat(dependency): 🎨 upgrade dependency and format code
2 parents 0b0d0b0 + c29d13d commit b514a57

62 files changed

Lines changed: 86 additions & 106 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
strategy:
13+
fail-fast: false
1314
matrix:
14-
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
15+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
1516
include:
1617
- python-version: '3.12'
1718
update-coverage: true
1819

1920
steps:
20-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2122
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2324
with:
2425
python-version: ${{ matrix.python-version }}
2526
- name: Cache pip
@@ -47,10 +48,10 @@ jobs:
4748
runs-on: ubuntu-latest
4849

4950
steps:
50-
- uses: actions/checkout@v6
51-
- uses: actions/setup-python@v2
51+
- uses: actions/checkout@v4
52+
- uses: actions/setup-python@v5
5253
with:
53-
python-version: 3.12
54+
python-version: '3.12'
5455
- name: Cache pip
5556
uses: actions/cache@v4
5657
with:

examples/apis/get_subscription_with_oauth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
This demo show how to use this library to do authorization and get your subscription.
2+
This demo show how to use this library to do authorization and get your subscription.
33
"""
44

55
import pyyoutube

examples/apis/oauth_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
This example demonstrates how to perform authorization.
2+
This example demonstrates how to perform authorization.
33
"""
44

55
from pyyoutube import Api

examples/clients/channel_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
This example demonstrates how to retrieve information for a channel.
2+
This example demonstrates how to retrieve information for a channel.
33
"""
44

55
from pyyoutube import Client

examples/clients/oauth_flow.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""
2-
This example demonstrates how to perform authorization.
2+
This example demonstrates how to perform authorization.
33
"""
44

55
from pyyoutube import Client
66

7-
87
CLIENT_ID = "xxx" # Your app id
98
CLIENT_SECRET = "xxx" # Your app secret
109
CLIENT_SECRET_PATH = None # or your path/to/client_secret_web.json

examples/clients/oauth_refreshing.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
"""
2-
This example demonstrates how to automatically (re)generate tokens for continuous OAuth.
3-
We store the Access Token in a seperate .env file to be used later.
2+
This example demonstrates how to automatically (re)generate tokens for continuous OAuth.
3+
We store the Access Token in a seperate .env file to be used later.
44
"""
55

66
from pyyoutube import Client
77
from json import loads, dumps
88
from pathlib import Path
99

10-
1110
CLIENT_ID = "xxx" # Your app id
1211
CLIENT_SECRET = "xxx" # Your app secret
1312
CLIENT_SECRET_PATH = None # or your path/to/client_secret_web.json

examples/clients/upload_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
This example demonstrates how to upload a video.
2+
This example demonstrates how to upload a video.
33
"""
44

55
import pyyoutube.models as mds

pyproject.toml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ classifiers = [
1313
"License :: OSI Approved :: Apache Software License",
1414
"Topic :: Software Development :: Libraries :: Python Modules",
1515
"Programming Language :: Python",
16-
"Programming Language :: Python :: 3.6",
17-
"Programming Language :: Python :: 3.7",
18-
"Programming Language :: Python :: 3.8",
1916
"Programming Language :: Python :: 3.9",
2017
"Programming Language :: Python :: 3.10",
2118
"Programming Language :: Python :: 3.11",
2219
"Programming Language :: Python :: 3.12",
20+
"Programming Language :: Python :: 3.13",
21+
"Programming Language :: Python :: 3.14",
2322
"Programming Language :: Python :: Implementation :: CPython",
2423
"Programming Language :: Python :: Implementation :: PyPy",
2524
]
@@ -30,29 +29,17 @@ packages = [
3029
]
3130

3231
[tool.poetry.dependencies]
33-
python = "^3.6"
34-
requests = "^2.24.0"
32+
python = "^3.9"
33+
requests = ">=2.28.0,<3.0.0"
3534
requests-oauthlib = ">=1.3.0,<3.0.0"
36-
isodate = ">=0.6.0,<=0.7.2"
37-
dataclasses-json = [
38-
{ version = "^0.5.3", python = "<3.7" },
39-
{ version = "^0.6.0", python = ">=3.7" }
40-
]
35+
isodate = ">=0.6.1,<1.0.0"
36+
dataclasses-json = ">=0.6.0,<1.0.0"
4137

42-
[tool.poetry.dev-dependencies]
43-
responses = [
44-
{ version = "^0.17.0", python = "<3.7" },
45-
{ version = "^0.23.0", python = ">=3.7" }
46-
]
47-
pytest = [
48-
{ version = "^6.2", python = "<3.7" },
49-
{ version = "^7.1", python = ">=3.7" }
50-
]
51-
pytest-cov = [
52-
{ version = "^2.10.1", python = "<3.7" },
53-
{ version = "^3.0.0", python = ">=3.7" }
54-
]
38+
[tool.poetry.group.dev.dependencies]
39+
responses = "^0.25.0"
40+
pytest = "^8.4.0"
41+
pytest-cov = "^6.2.0"
5542

5643
[build-system]
57-
requires = ["poetry-core>=1.0.0"]
44+
requires = ["poetry-core>=2.0.0"]
5845
build-backend = "poetry.core.masonry.api"

pyyoutube/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Main Api implementation.
2+
Main Api implementation.
33
"""
44

55
from typing import Optional, List, Union

pyyoutube/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
New Client for YouTube API
2+
New Client for YouTube API
33
"""
44

55
import inspect

0 commit comments

Comments
 (0)