Skip to content

Commit 547a498

Browse files
committed
Enhancements.
1 parent ed685ea commit 547a498

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ check: ## Run code checks.
3636

3737

3838
fmt: ## Format the code.
39-
@black --target-version=py37 --safe --line-length=79 "$(PROJECT)"
39+
@black --target-version=py39 --safe --line-length=88 "$(PROJECT)"

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# -- Options for HTML output -------------------------------------------------
4444
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
4545

46-
html_theme = "sphinx_rtd_theme"
46+
html_theme = "furo"
4747
html_static_path = ["_static"]
4848

4949
# autodoc

paperswithcode/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22
import functools
33
from urllib import parse
4-
from typing import Dict, Optional
4+
from typing import Optional
55

66
from paperswithcode.config import config
77
from paperswithcode.http import HttpClient
@@ -87,7 +87,7 @@ def __init__(self, token=None, url=None):
8787
)
8888

8989
@staticmethod
90-
def __params(page: int, items_per_page: int, **kwargs) -> Dict[str, str]:
90+
def __params(page: int, items_per_page: int, **kwargs) -> dict[str, str]:
9191
params = {key: str(value) for key, value in kwargs.items()}
9292
params["page"] = str(page)
9393
params["items_per_page"] = str(items_per_page)

paperswithcode/http.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import enum
2-
from typing import Optional, Dict
2+
from typing import Optional
33

44
import httpx
55

@@ -60,8 +60,8 @@ def request(
6060
self,
6161
method: str,
6262
url: str,
63-
headers: Optional[Dict[str, str]] = None,
64-
params: Optional[Dict[str, str]] = None,
63+
headers: Optional[dict[str, str]] = None,
64+
params: Optional[dict[str, str]] = None,
6565
data: Optional[Model] = None,
6666
timeout: Optional[float] = None,
6767
) -> dict:
@@ -185,8 +185,8 @@ def request(
185185
def get(
186186
self,
187187
url: str,
188-
headers: Optional[Dict[str, str]] = None,
189-
params: Optional[Dict[str, str]] = None,
188+
headers: Optional[dict[str, str]] = None,
189+
params: Optional[dict[str, str]] = None,
190190
timeout: Optional[float] = None,
191191
) -> dict:
192192
"""Perform get request.
@@ -213,8 +213,8 @@ def get(
213213
def patch(
214214
self,
215215
url: str,
216-
headers: Optional[Dict[str, str]] = None,
217-
params: Optional[Dict[str, str]] = None,
216+
headers: Optional[dict[str, str]] = None,
217+
params: Optional[dict[str, str]] = None,
218218
data: Optional[Model] = None,
219219
timeout: Optional[float] = None,
220220
) -> dict:
@@ -244,8 +244,8 @@ def patch(
244244
def post(
245245
self,
246246
url: str,
247-
headers: Optional[Dict[str, str]] = None,
248-
params: Optional[Dict[str, str]] = None,
247+
headers: Optional[dict[str, str]] = None,
248+
params: Optional[dict[str, str]] = None,
249249
data: Optional[Model] = None,
250250
timeout: Optional[float] = None,
251251
) -> dict:
@@ -275,8 +275,8 @@ def post(
275275
def delete(
276276
self,
277277
url,
278-
headers: Optional[Dict[str, str]] = None,
279-
params: Optional[Dict[str, str]] = None,
278+
headers: Optional[dict[str, str]] = None,
279+
params: Optional[dict[str, str]] = None,
280280
timeout: Optional[float] = None,
281281
) -> dict:
282282
"""Perform delete request.

paperswithcode/models/repository.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ class Repositories(Page):
3232
"""Object representing a paginated page of repositories.
3333
3434
Attributes:
35-
count (int): Number of elements matching the query.
36-
next_page (int, optional): Number of the next page.
37-
previous_page (int, optional): Number of the previous page.
38-
results (List[Repository]): List of repositories on this page.
35+
count: Number of elements matching the query.
36+
next_page: Number of the next page.
37+
previous_page: Number of the previous page.
38+
results: List of repositories on this page.
3939
"""
4040

4141
results: list[Repository]

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
-r requirements.txt
22
black~=24.4.2
33
flake8~=7.0.0
4+
furo~=2024.5.6
45
myst-parser~=3.0.1
56
pre-commit~=3.7.0
67
pydocstyle~=6.3.0
78
pytest~=8.2.0
89
pytest-cov~=5.0.0
910
sphinx~=7.3.7
10-
sphinx-rtd-theme~=2.0.0
1111
twine~=5.0.0

0 commit comments

Comments
 (0)