Skip to content

Commit 0bf72b6

Browse files
committed
Release version 0.0.0.dev75
1 parent afcbd0a commit 0bf72b6

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

pkg/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ namespaces = true
1717
# ----------------------------------------- Project Metadata -------------------------------------
1818
#
1919
[project]
20-
version = "0.0.0.dev74"
20+
version = "0.0.0.dev75"
2121
name = "PyLinks"
2222
dependencies = [
2323
"requests >= 2.31.0, < 3",
24-
"ExceptionMan == 0.0.0.dev61",
25-
"MDit == 0.0.0.dev61",
24+
"ExceptionMan == 0.0.0.dev62",
25+
"MDit == 0.0.0.dev62",
2626
]
2727
requires-python = ">=3.10"

pkg/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
requests >= 2.31.0, < 3
2-
ExceptionMan == 0.0.0.dev61
3-
MDit == 0.0.0.dev61
2+
ExceptionMan == 0.0.0.dev62
3+
MDit == 0.0.0.dev62

pkg/src/pylinks/api/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def doi(doi: str) -> DOI:
1010
return DOI(doi=doi)
1111

1212

13-
def github(token: Optional[str] = None) -> GitHub:
14-
return GitHub(token=token)
13+
def github(token: Optional[str] = None, timezone: str | None = "UTC") -> GitHub:
14+
return GitHub(token=token, timezone=timezone)
1515

1616

1717
def orcid(orcid_id: str) -> Orcid:

pkg/src/pylinks/api/github.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ class GitHub:
2121
- [GraphQL API Documentation](https://docs.github.com/en/graphql)
2222
"""
2323

24-
def __init__(self, token: Optional[str] = None):
24+
def __init__(self, token: Optional[str] = None, timezone: str | None = "UTC"):
2525
self._endpoint = {
2626
"api": _pylinks.url.create("https://api.github.com"),
2727
"upload": _pylinks.url.create("https://uploads.github.com"),
2828
}
2929
self._token = token
3030
self._headers = {"X-GitHub-Api-Version": "2022-11-28"}
31+
if timezone:
32+
self._headers["Time-Zone"] = timezone
3133
if self._token:
3234
self._headers["Authorization"] = f"Bearer {self._token}"
3335
return
@@ -184,10 +186,10 @@ def authenticated(self) -> bool:
184186

185187

186188
class User:
187-
def __init__(self, username: str, token: Optional[str] = None):
189+
def __init__(self, username: str, token: Optional[str] = None, timezone: str | None = "UTC"):
188190
self._username = username
189191
self._token = token
190-
self._github = GitHub(token)
192+
self._github = GitHub(token, timezone=timezone)
191193
return
192194

193195
def _rest_query(
@@ -228,11 +230,11 @@ def repo(self, repo_name) -> "Repo":
228230

229231

230232
class Repo:
231-
def __init__(self, username: str, name: str, token: Optional[str] = None):
233+
def __init__(self, username: str, name: str, token: Optional[str] = None, timezone: str | None = "UTC"):
232234
self._username = username
233235
self._name = name
234236
self._token = token
235-
self._github = GitHub(token)
237+
self._github = GitHub(token, timezone=timezone)
236238
return
237239

238240
def _rest_query(

0 commit comments

Comments
 (0)