Skip to content

Commit 23b023a

Browse files
pre-commit-ci[bot]Carreau
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 142d690 commit 23b023a

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

nbviewer/_version.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import re
1212
import subprocess
1313
import sys
14-
1514
from typing import Dict
1615

1716

nbviewer/providers/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
import time
1212
from contextlib import contextmanager
1313
from datetime import datetime
14+
from functools import wraps
1415
from html import escape
1516
from http.client import responses
1617
from urllib.parse import quote
1718
from urllib.parse import urlencode
1819
from urllib.parse import urlparse
1920
from urllib.parse import urlunparse
20-
from functools import wraps
2121

2222
import statsd
2323
from nbformat import current_nbformat
@@ -530,6 +530,7 @@ def cached(method):
530530
This only handles getting from the cache, not writing to it.
531531
Writing to the cache must be handled in the decorated method.
532532
"""
533+
533534
@wraps(method)
534535
async def cached_method(self, *args, **kwargs):
535536
uri = self.request.path

nbviewer/providers/github/handlers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def render_github_user_template(
110110
next_url=next_url,
111111
prev_url=prev_url,
112112
**self.PROVIDER_CTX,
113-
**namespace
113+
**namespace,
114114
)
115115

116116
@cached
@@ -170,7 +170,7 @@ def render_treelist_template(
170170
branches,
171171
tags,
172172
executor_url,
173-
**namespace
173+
**namespace,
174174
):
175175
"""
176176
breadcrumbs: list of dict
@@ -195,7 +195,7 @@ def render_treelist_template(
195195
tree_label="repositories",
196196
executor_url=executor_url,
197197
**self.PROVIDER_CTX,
198-
**namespace
198+
**namespace,
199199
)
200200

201201
@cached
@@ -433,7 +433,7 @@ async def deliver_notebook(
433433
breadcrumbs=breadcrumbs,
434434
msg="file from GitHub: %s" % raw_url,
435435
public=True,
436-
**self.PROVIDER_CTX
436+
**self.PROVIDER_CTX,
437437
)
438438
else:
439439
mime, enc = mimetypes.guess_type(path)

nbviewer/tests/base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import time
1414
from contextlib import contextmanager
1515
from subprocess import Popen
16+
from typing import Dict
1617
from unittest import skipIf
1718
from unittest import TestCase
1819

@@ -23,15 +24,13 @@
2324
from nbviewer.providers.github.client import AsyncGitHubClient
2425
from nbviewer.utils import url_path_join
2526

26-
from typing import Dict
27-
2827

2928
class NBViewerTestCase(TestCase):
3029
"""A base class for tests that need a running nbviewer server."""
3130

3231
port = 12341
3332

34-
environment_variables:Dict[str, str] = {}
33+
environment_variables: Dict[str, str] = {}
3534

3635
def assertIn(self, observed, expected, *args, **kwargs):
3736
return super().assertIn(

0 commit comments

Comments
 (0)