From c29d13d0ba5a2d7377f39a244b919d90f22d2fed Mon Sep 17 00:00:00 2001 From: ikaroskun Date: Fri, 17 Apr 2026 17:25:24 +0800 Subject: [PATCH] feat(dependency): :art: upgrade dependency and format code --- .github/workflows/test.yaml | 13 +++---- examples/apis/get_subscription_with_oauth.py | 2 +- examples/apis/oauth_flow.py | 2 +- examples/clients/channel_info.py | 2 +- examples/clients/oauth_flow.py | 3 +- examples/clients/oauth_refreshing.py | 5 ++- examples/clients/upload_video.py | 2 +- pyproject.toml | 35 ++++++------------- pyyoutube/api.py | 2 +- pyyoutube/client.py | 2 +- pyyoutube/media.py | 2 +- pyyoutube/models/activity.py | 2 +- pyyoutube/models/caption.py | 2 +- pyyoutube/models/category.py | 4 +-- pyyoutube/models/channel.py | 4 +-- pyyoutube/models/channel_banner.py | 4 +-- pyyoutube/models/channel_section.py | 2 +- pyyoutube/models/comment.py | 2 +- pyyoutube/models/comment_thread.py | 2 +- pyyoutube/models/common.py | 2 +- pyyoutube/models/i18n.py | 2 +- pyyoutube/models/member.py | 2 +- pyyoutube/models/memberships_level.py | 2 +- pyyoutube/models/mixins.py | 2 +- pyyoutube/models/playlist.py | 2 +- pyyoutube/models/playlist_item.py | 2 +- pyyoutube/models/search_result.py | 2 +- pyyoutube/models/subscription.py | 2 +- pyyoutube/models/video.py | 2 +- pyyoutube/models/video_abuse_report_reason.py | 2 +- pyyoutube/models/watermark.py | 2 +- pyyoutube/resources/activities.py | 2 +- pyyoutube/resources/base_resource.py | 2 +- pyyoutube/resources/captions.py | 2 +- pyyoutube/resources/channel_banners.py | 2 +- pyyoutube/resources/channel_sections.py | 2 +- pyyoutube/resources/channels.py | 2 +- pyyoutube/resources/comment_threads.py | 2 +- pyyoutube/resources/comments.py | 2 +- pyyoutube/resources/i18n_languages.py | 2 +- pyyoutube/resources/i18n_regions.py | 2 +- pyyoutube/resources/members.py | 2 +- pyyoutube/resources/membership_levels.py | 2 +- pyyoutube/resources/playlist_items.py | 2 +- pyyoutube/resources/playlists.py | 2 +- pyyoutube/resources/search.py | 2 +- pyyoutube/resources/subscriptions.py | 2 +- pyyoutube/resources/thumbnails.py | 2 +- .../resources/video_abuse_report_reasons.py | 2 +- pyyoutube/resources/video_categories.py | 2 +- pyyoutube/resources/videos.py | 2 +- pyyoutube/resources/watermarks.py | 2 +- pyyoutube/utils/constants.py | 2 +- pyyoutube/utils/params_checker.py | 2 +- pyyoutube/youtube_utils.py | 2 +- tests/clients/base.py | 2 +- tests/clients/test_captions.py | 16 +++------ tests/clients/test_channel_banners.py | 2 +- tests/clients/test_client.py | 2 +- tests/clients/test_media.py | 2 +- tests/clients/test_thumbnails.py | 2 +- tests/clients/test_watermarks.py | 2 +- 62 files changed, 86 insertions(+), 106 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4f1acf3b..b3464f41 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,16 +10,17 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] include: - python-version: '3.12' update-coverage: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache pip @@ -47,10 +48,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: '3.12' - name: Cache pip uses: actions/cache@v4 with: diff --git a/examples/apis/get_subscription_with_oauth.py b/examples/apis/get_subscription_with_oauth.py index 4461ea5c..85c8fa2b 100644 --- a/examples/apis/get_subscription_with_oauth.py +++ b/examples/apis/get_subscription_with_oauth.py @@ -1,5 +1,5 @@ """ - This demo show how to use this library to do authorization and get your subscription. +This demo show how to use this library to do authorization and get your subscription. """ import pyyoutube diff --git a/examples/apis/oauth_flow.py b/examples/apis/oauth_flow.py index 92ff4ff2..d358d8e1 100644 --- a/examples/apis/oauth_flow.py +++ b/examples/apis/oauth_flow.py @@ -1,5 +1,5 @@ """ - This example demonstrates how to perform authorization. +This example demonstrates how to perform authorization. """ from pyyoutube import Api diff --git a/examples/clients/channel_info.py b/examples/clients/channel_info.py index 629fcb5e..12548be3 100644 --- a/examples/clients/channel_info.py +++ b/examples/clients/channel_info.py @@ -1,5 +1,5 @@ """ - This example demonstrates how to retrieve information for a channel. +This example demonstrates how to retrieve information for a channel. """ from pyyoutube import Client diff --git a/examples/clients/oauth_flow.py b/examples/clients/oauth_flow.py index ef358b12..5efa7276 100644 --- a/examples/clients/oauth_flow.py +++ b/examples/clients/oauth_flow.py @@ -1,10 +1,9 @@ """ - This example demonstrates how to perform authorization. +This example demonstrates how to perform authorization. """ from pyyoutube import Client - CLIENT_ID = "xxx" # Your app id CLIENT_SECRET = "xxx" # Your app secret CLIENT_SECRET_PATH = None # or your path/to/client_secret_web.json diff --git a/examples/clients/oauth_refreshing.py b/examples/clients/oauth_refreshing.py index fb38a855..82e97f4c 100644 --- a/examples/clients/oauth_refreshing.py +++ b/examples/clients/oauth_refreshing.py @@ -1,13 +1,12 @@ """ - This example demonstrates how to automatically (re)generate tokens for continuous OAuth. - We store the Access Token in a seperate .env file to be used later. +This example demonstrates how to automatically (re)generate tokens for continuous OAuth. +We store the Access Token in a seperate .env file to be used later. """ from pyyoutube import Client from json import loads, dumps from pathlib import Path - CLIENT_ID = "xxx" # Your app id CLIENT_SECRET = "xxx" # Your app secret CLIENT_SECRET_PATH = None # or your path/to/client_secret_web.json diff --git a/examples/clients/upload_video.py b/examples/clients/upload_video.py index 345627fa..85c6575d 100644 --- a/examples/clients/upload_video.py +++ b/examples/clients/upload_video.py @@ -1,5 +1,5 @@ """ - This example demonstrates how to upload a video. +This example demonstrates how to upload a video. """ import pyyoutube.models as mds diff --git a/pyproject.toml b/pyproject.toml index 19613675..83430c55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,13 +13,12 @@ classifiers = [ "License :: OSI Approved :: Apache Software License", "Topic :: Software Development :: Libraries :: Python Modules", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] @@ -30,29 +29,17 @@ packages = [ ] [tool.poetry.dependencies] -python = "^3.6" -requests = "^2.24.0" +python = "^3.9" +requests = ">=2.28.0,<3.0.0" requests-oauthlib = ">=1.3.0,<3.0.0" -isodate = ">=0.6.0,<=0.7.2" -dataclasses-json = [ - { version = "^0.5.3", python = "<3.7" }, - { version = "^0.6.0", python = ">=3.7" } -] +isodate = ">=0.6.1,<1.0.0" +dataclasses-json = ">=0.6.0,<1.0.0" -[tool.poetry.dev-dependencies] -responses = [ - { version = "^0.17.0", python = "<3.7" }, - { version = "^0.23.0", python = ">=3.7" } -] -pytest = [ - { version = "^6.2", python = "<3.7" }, - { version = "^7.1", python = ">=3.7" } -] -pytest-cov = [ - { version = "^2.10.1", python = "<3.7" }, - { version = "^3.0.0", python = ">=3.7" } -] +[tool.poetry.group.dev.dependencies] +responses = "^0.25.0" +pytest = "^8.4.0" +pytest-cov = "^6.2.0" [build-system] -requires = ["poetry-core>=1.0.0"] +requires = ["poetry-core>=2.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/pyyoutube/api.py b/pyyoutube/api.py index 37fada2d..990f95a8 100644 --- a/pyyoutube/api.py +++ b/pyyoutube/api.py @@ -1,5 +1,5 @@ """ - Main Api implementation. +Main Api implementation. """ from typing import Optional, List, Union diff --git a/pyyoutube/client.py b/pyyoutube/client.py index 8864c6c6..3cc044f3 100644 --- a/pyyoutube/client.py +++ b/pyyoutube/client.py @@ -1,5 +1,5 @@ """ - New Client for YouTube API +New Client for YouTube API """ import inspect diff --git a/pyyoutube/media.py b/pyyoutube/media.py index 02e04a11..e801af19 100644 --- a/pyyoutube/media.py +++ b/pyyoutube/media.py @@ -1,5 +1,5 @@ """ - Media object to upload. +Media object to upload. """ import mimetypes diff --git a/pyyoutube/models/activity.py b/pyyoutube/models/activity.py index 4dcdbfc2..aea03147 100644 --- a/pyyoutube/models/activity.py +++ b/pyyoutube/models/activity.py @@ -1,5 +1,5 @@ """ - These are activity related models. +These are activity related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/caption.py b/pyyoutube/models/caption.py index 493961e3..682fc0e0 100644 --- a/pyyoutube/models/caption.py +++ b/pyyoutube/models/caption.py @@ -1,5 +1,5 @@ """ - These are caption related models +These are caption related models """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/category.py b/pyyoutube/models/category.py index 7260e3db..1b20ff06 100644 --- a/pyyoutube/models/category.py +++ b/pyyoutube/models/category.py @@ -1,6 +1,6 @@ """ - These are category related models. - Include VideoCategory +These are category related models. +Include VideoCategory """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/channel.py b/pyyoutube/models/channel.py index b39478ef..cc27e76a 100644 --- a/pyyoutube/models/channel.py +++ b/pyyoutube/models/channel.py @@ -1,7 +1,7 @@ """ - These are channel related models. +These are channel related models. - References: https://developers.google.com/youtube/v3/docs/channels#properties +References: https://developers.google.com/youtube/v3/docs/channels#properties """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/channel_banner.py b/pyyoutube/models/channel_banner.py index ba76da0b..8e233fff 100644 --- a/pyyoutube/models/channel_banner.py +++ b/pyyoutube/models/channel_banner.py @@ -1,7 +1,7 @@ """ - There are channel banner related models +There are channel banner related models - References: https://developers.google.com/youtube/v3/docs/channelBanners#properties +References: https://developers.google.com/youtube/v3/docs/channelBanners#properties """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/channel_section.py b/pyyoutube/models/channel_section.py index 73d4c9ed..e38c8043 100644 --- a/pyyoutube/models/channel_section.py +++ b/pyyoutube/models/channel_section.py @@ -1,5 +1,5 @@ """ - Those are models related to channel sections. +Those are models related to channel sections. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/comment.py b/pyyoutube/models/comment.py index e979c3bc..a90f60dd 100644 --- a/pyyoutube/models/comment.py +++ b/pyyoutube/models/comment.py @@ -1,5 +1,5 @@ """ - These are comment related models. +These are comment related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/comment_thread.py b/pyyoutube/models/comment_thread.py index eed6ffc8..2772600c 100644 --- a/pyyoutube/models/comment_thread.py +++ b/pyyoutube/models/comment_thread.py @@ -1,5 +1,5 @@ """ - These are comment threads related models. +These are comment threads related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/common.py b/pyyoutube/models/common.py index 6e554f14..1ad79a77 100644 --- a/pyyoutube/models/common.py +++ b/pyyoutube/models/common.py @@ -1,5 +1,5 @@ """ - These are common models for multi resource. +These are common models for multi resource. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/i18n.py b/pyyoutube/models/i18n.py index 17533450..00c9bcad 100644 --- a/pyyoutube/models/i18n.py +++ b/pyyoutube/models/i18n.py @@ -1,5 +1,5 @@ """ - These are i18n language and region related models. +These are i18n language and region related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/member.py b/pyyoutube/models/member.py index 2dee7c16..d4051e81 100644 --- a/pyyoutube/models/member.py +++ b/pyyoutube/models/member.py @@ -1,5 +1,5 @@ """ - These are member related models. +These are member related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/memberships_level.py b/pyyoutube/models/memberships_level.py index 6938beb0..552e77f1 100644 --- a/pyyoutube/models/memberships_level.py +++ b/pyyoutube/models/memberships_level.py @@ -1,5 +1,5 @@ """ - These are membership level related models. +These are membership level related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/mixins.py b/pyyoutube/models/mixins.py index 24e463fe..30bcd1f3 100644 --- a/pyyoutube/models/mixins.py +++ b/pyyoutube/models/mixins.py @@ -1,5 +1,5 @@ """ - These are some mixin for models +These are some mixin for models """ import datetime diff --git a/pyyoutube/models/playlist.py b/pyyoutube/models/playlist.py index a1fa680b..bc2a8265 100644 --- a/pyyoutube/models/playlist.py +++ b/pyyoutube/models/playlist.py @@ -1,5 +1,5 @@ """ - These are playlist related models. +These are playlist related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/playlist_item.py b/pyyoutube/models/playlist_item.py index 66d1c03b..050b572d 100644 --- a/pyyoutube/models/playlist_item.py +++ b/pyyoutube/models/playlist_item.py @@ -1,5 +1,5 @@ """ - These are playlistItem related models. +These are playlistItem related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/search_result.py b/pyyoutube/models/search_result.py index c8b242d3..e8d122b0 100644 --- a/pyyoutube/models/search_result.py +++ b/pyyoutube/models/search_result.py @@ -1,5 +1,5 @@ """ - These are search result related models. +These are search result related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/subscription.py b/pyyoutube/models/subscription.py index 359b8100..7e9443f6 100644 --- a/pyyoutube/models/subscription.py +++ b/pyyoutube/models/subscription.py @@ -1,5 +1,5 @@ """ - These are subscription related models. +These are subscription related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/video.py b/pyyoutube/models/video.py index 75bd9235..e9c19d2a 100644 --- a/pyyoutube/models/video.py +++ b/pyyoutube/models/video.py @@ -1,5 +1,5 @@ """ - These are video related models. +These are video related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/video_abuse_report_reason.py b/pyyoutube/models/video_abuse_report_reason.py index 0211320c..ae1fcae0 100644 --- a/pyyoutube/models/video_abuse_report_reason.py +++ b/pyyoutube/models/video_abuse_report_reason.py @@ -1,5 +1,5 @@ """ - These are video abuse report reason related models. +These are video abuse report reason related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/models/watermark.py b/pyyoutube/models/watermark.py index 812fc96a..b4771a45 100644 --- a/pyyoutube/models/watermark.py +++ b/pyyoutube/models/watermark.py @@ -1,5 +1,5 @@ """ - These are watermark related models. +These are watermark related models. """ from dataclasses import dataclass, field diff --git a/pyyoutube/resources/activities.py b/pyyoutube/resources/activities.py index 9fa57f66..e477d357 100644 --- a/pyyoutube/resources/activities.py +++ b/pyyoutube/resources/activities.py @@ -1,5 +1,5 @@ """ - Activities resource implementation +Activities resource implementation """ from typing import Optional, Union diff --git a/pyyoutube/resources/base_resource.py b/pyyoutube/resources/base_resource.py index 48230a18..5843882f 100644 --- a/pyyoutube/resources/base_resource.py +++ b/pyyoutube/resources/base_resource.py @@ -1,5 +1,5 @@ """ - Base resource class. +Base resource class. """ from typing import Optional, TYPE_CHECKING diff --git a/pyyoutube/resources/captions.py b/pyyoutube/resources/captions.py index 1a433f14..9c218d84 100644 --- a/pyyoutube/resources/captions.py +++ b/pyyoutube/resources/captions.py @@ -1,5 +1,5 @@ """ - Captions resource implementation +Captions resource implementation """ from typing import Optional, Union diff --git a/pyyoutube/resources/channel_banners.py b/pyyoutube/resources/channel_banners.py index 4c28f1f0..974367e3 100644 --- a/pyyoutube/resources/channel_banners.py +++ b/pyyoutube/resources/channel_banners.py @@ -1,5 +1,5 @@ """ - Channel banners resource implementation. +Channel banners resource implementation. """ from typing import Optional diff --git a/pyyoutube/resources/channel_sections.py b/pyyoutube/resources/channel_sections.py index ea441df3..5b4d2069 100644 --- a/pyyoutube/resources/channel_sections.py +++ b/pyyoutube/resources/channel_sections.py @@ -1,5 +1,5 @@ """ - Channel Section resource implementation. +Channel Section resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/channels.py b/pyyoutube/resources/channels.py index 311726c3..f207d66d 100644 --- a/pyyoutube/resources/channels.py +++ b/pyyoutube/resources/channels.py @@ -1,5 +1,5 @@ """ - Channel resource implementation. +Channel resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/comment_threads.py b/pyyoutube/resources/comment_threads.py index 3637fce1..772abb0d 100644 --- a/pyyoutube/resources/comment_threads.py +++ b/pyyoutube/resources/comment_threads.py @@ -1,5 +1,5 @@ """ - Comment threads resource implementation. +Comment threads resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/comments.py b/pyyoutube/resources/comments.py index 492451b6..1a923270 100644 --- a/pyyoutube/resources/comments.py +++ b/pyyoutube/resources/comments.py @@ -1,5 +1,5 @@ """ - Comment resource implementation. +Comment resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/i18n_languages.py b/pyyoutube/resources/i18n_languages.py index 902e6aa3..bfe32d2e 100644 --- a/pyyoutube/resources/i18n_languages.py +++ b/pyyoutube/resources/i18n_languages.py @@ -1,5 +1,5 @@ """ - i18n language resource implementation. +i18n language resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/i18n_regions.py b/pyyoutube/resources/i18n_regions.py index a927224a..723d4159 100644 --- a/pyyoutube/resources/i18n_regions.py +++ b/pyyoutube/resources/i18n_regions.py @@ -1,5 +1,5 @@ """ - i18n regions resource implementation. +i18n regions resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/members.py b/pyyoutube/resources/members.py index 313e1db3..1bfa2766 100644 --- a/pyyoutube/resources/members.py +++ b/pyyoutube/resources/members.py @@ -1,5 +1,5 @@ """ - Members resource implementation. +Members resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/membership_levels.py b/pyyoutube/resources/membership_levels.py index 3799b936..8edfd257 100644 --- a/pyyoutube/resources/membership_levels.py +++ b/pyyoutube/resources/membership_levels.py @@ -1,5 +1,5 @@ """ - Membership levels resource implementation. +Membership levels resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/playlist_items.py b/pyyoutube/resources/playlist_items.py index cb86c2ba..4c23c8ef 100644 --- a/pyyoutube/resources/playlist_items.py +++ b/pyyoutube/resources/playlist_items.py @@ -1,5 +1,5 @@ """ - Playlist items resource implementation. +Playlist items resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/playlists.py b/pyyoutube/resources/playlists.py index fd7b153a..b2e5ee70 100644 --- a/pyyoutube/resources/playlists.py +++ b/pyyoutube/resources/playlists.py @@ -1,5 +1,5 @@ """ - Playlist resource implementation. +Playlist resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/search.py b/pyyoutube/resources/search.py index 45007d73..4ea43171 100644 --- a/pyyoutube/resources/search.py +++ b/pyyoutube/resources/search.py @@ -1,5 +1,5 @@ """ - Search resource implementation. +Search resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/subscriptions.py b/pyyoutube/resources/subscriptions.py index e4e1f788..51f892ef 100644 --- a/pyyoutube/resources/subscriptions.py +++ b/pyyoutube/resources/subscriptions.py @@ -1,5 +1,5 @@ """ - Subscription resource implementation. +Subscription resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/thumbnails.py b/pyyoutube/resources/thumbnails.py index 67d92a4a..fb5a3645 100644 --- a/pyyoutube/resources/thumbnails.py +++ b/pyyoutube/resources/thumbnails.py @@ -1,5 +1,5 @@ """ - Thumbnails resources implementation. +Thumbnails resources implementation. """ from typing import Optional diff --git a/pyyoutube/resources/video_abuse_report_reasons.py b/pyyoutube/resources/video_abuse_report_reasons.py index 4697fac1..ed75c3da 100644 --- a/pyyoutube/resources/video_abuse_report_reasons.py +++ b/pyyoutube/resources/video_abuse_report_reasons.py @@ -1,5 +1,5 @@ """ - Video abuse report reasons resource implementation. +Video abuse report reasons resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/video_categories.py b/pyyoutube/resources/video_categories.py index 8493f1e5..addc0d7d 100644 --- a/pyyoutube/resources/video_categories.py +++ b/pyyoutube/resources/video_categories.py @@ -1,5 +1,5 @@ """ - Video categories resource implementation. +Video categories resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/videos.py b/pyyoutube/resources/videos.py index 8bf63bfe..a6cb2cb3 100644 --- a/pyyoutube/resources/videos.py +++ b/pyyoutube/resources/videos.py @@ -1,5 +1,5 @@ """ - Videos resource implementation. +Videos resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/resources/watermarks.py b/pyyoutube/resources/watermarks.py index c4ac8b4f..7bf834b0 100644 --- a/pyyoutube/resources/watermarks.py +++ b/pyyoutube/resources/watermarks.py @@ -1,5 +1,5 @@ """ - Watermarks resource implementation. +Watermarks resource implementation. """ from typing import Optional, Union diff --git a/pyyoutube/utils/constants.py b/pyyoutube/utils/constants.py index 55b12953..d858ee0c 100644 --- a/pyyoutube/utils/constants.py +++ b/pyyoutube/utils/constants.py @@ -1,5 +1,5 @@ """ - some constants for YouTube +some constants for YouTube """ ACTIVITIES_RESOURCE_PROPERTIES = {"id", "snippet", "contentDetails"} diff --git a/pyyoutube/utils/params_checker.py b/pyyoutube/utils/params_checker.py index 250abb68..145f7c3a 100644 --- a/pyyoutube/utils/params_checker.py +++ b/pyyoutube/utils/params_checker.py @@ -1,5 +1,5 @@ """ - function's params checker. +function's params checker. """ import logging diff --git a/pyyoutube/youtube_utils.py b/pyyoutube/youtube_utils.py index 08fbead7..972a6c76 100644 --- a/pyyoutube/youtube_utils.py +++ b/pyyoutube/youtube_utils.py @@ -1,5 +1,5 @@ """ - This provide some common utils methods for YouTube resource. +This provide some common utils methods for YouTube resource. """ import isodate diff --git a/tests/clients/base.py b/tests/clients/base.py index 37998fea..943194a6 100644 --- a/tests/clients/base.py +++ b/tests/clients/base.py @@ -1,5 +1,5 @@ """ - Base class +Base class """ diff --git a/tests/clients/test_captions.py b/tests/clients/test_captions.py index bb5dab33..88be7519 100644 --- a/tests/clients/test_captions.py +++ b/tests/clients/test_captions.py @@ -1,5 +1,5 @@ """ - Tests for captions resources. +Tests for captions resources. """ import io @@ -35,15 +35,11 @@ def test_insert(self, helpers, authed_cli): name="日文字幕", language="ja", videoId=video_id, isDraft=True ) ) - media = Media( - io.StringIO( - """ + media = Media(io.StringIO(""" 1 00:00:00,036 --> 00:00:00,703 ジメジメした天気 - """ - ) - ) + """)) upload = authed_cli.captions.insert( body=body, @@ -59,13 +55,11 @@ def test_update(self, helpers, authed_cli): snippet=mds.CaptionSnippet(videoId="zxTVeyG1600", isDraft=False), ) media = Media( - io.StringIO( - """ + io.StringIO(""" 1 00:00:00,036 --> 00:00:00,703 ジメジメした天気 - """ - ), + """), ) upload = authed_cli.captions.update( diff --git a/tests/clients/test_channel_banners.py b/tests/clients/test_channel_banners.py index 295674d7..0751eb0c 100644 --- a/tests/clients/test_channel_banners.py +++ b/tests/clients/test_channel_banners.py @@ -1,5 +1,5 @@ """ - Tests for channel banners +Tests for channel banners """ import io diff --git a/tests/clients/test_client.py b/tests/clients/test_client.py index 87c52d4e..ab4b22c5 100644 --- a/tests/clients/test_client.py +++ b/tests/clients/test_client.py @@ -1,5 +1,5 @@ """ - Tests for client. +Tests for client. """ import pytest diff --git a/tests/clients/test_media.py b/tests/clients/test_media.py index 283e820b..9c9e9020 100644 --- a/tests/clients/test_media.py +++ b/tests/clients/test_media.py @@ -1,5 +1,5 @@ """ - Tests for media upload. +Tests for media upload. """ import io diff --git a/tests/clients/test_thumbnails.py b/tests/clients/test_thumbnails.py index 4826c1eb..f2b294ff 100644 --- a/tests/clients/test_thumbnails.py +++ b/tests/clients/test_thumbnails.py @@ -1,5 +1,5 @@ """ - Tests for thumbnails. +Tests for thumbnails. """ import io diff --git a/tests/clients/test_watermarks.py b/tests/clients/test_watermarks.py index 0c023bfc..29e8e7aa 100644 --- a/tests/clients/test_watermarks.py +++ b/tests/clients/test_watermarks.py @@ -1,5 +1,5 @@ """ - Tests for watermarks. +Tests for watermarks. """ import io