Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 Update dependencies #47

Merged
merged 5 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 25 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
name = 'sonyci'
description = 'A Sony Ci api client'
authors = [{ name = 'WGBH-MLA', email = '[email protected]' }]
dependencies = ["pydantic~=2.9", "requests-oauth2client<1.6", "loguru~=0.7"]
dependencies = [
"pydantic~=2.9",
"requests-oauth2client~=1.6",
"loguru~=0.7",
]
requires-python = '>=3.8'
readme = 'README.md'
license = { text = 'MIT' }
Expand All @@ -21,9 +25,15 @@ test = [
"pytest-xdist~=3.6",
"urllib3~=1.26",
]
cli = ["typer[all]~=0.12"]
cli-ci = ["typer~=0.12"]
tui = ["trogon~=0.5"]
cli = [
"typer[all]~=0.12",
]
cli-ci = [
"typer~=0.12",
]
tui = [
"trogon~=0.5",
]
docs = [
"mkdocs~=1.6",
"mkdocs-material~=9.5",
Expand All @@ -41,7 +51,17 @@ build-backend = 'pdm.backend'
version = { source = 'file', path = 'sonyci/_version.py' }

[tool.pdm.dev-dependencies]
dev = ["ruff~=0.6", "black~=24.8", "pre-commit~=3.5"]
dev = [
"ruff~=0.6",
"black~=24.8",
"pre-commit~=3.5",
]

[tool.pdm.scripts]
test = 'pytest --vcr-record=none'
docs = 'mkdocs serve'
lint = 'ruff check . --fix'
format = 'black -S .'

[tool.pytest.ini_options]
testpaths = ['tests']
Expand Down
4 changes: 2 additions & 2 deletions sonyci/sonyci.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any, ClassVar

from requests_oauth2client import ApiClient, OAuth2Client
from requests_oauth2client.auth import BearerAuth, OAuth2AccessTokenAuth
from requests_oauth2client.auth import OAuth2AccessTokenAuth
from requests_oauth2client.tokens import BearerToken

from sonyci.config import Config
Expand Down Expand Up @@ -50,7 +50,7 @@ def auth(self) -> OAuth2AccessTokenAuth:
"""
if self.client_id and self.client_secret:
return OAuth2AccessTokenAuth(client=self.oauth, token=self.token)
return BearerAuth(token=self.token)
return BearerToken(self.token.access_token)

@property
def client(self) -> ApiClient:
Expand Down