Skip to content

Commit 1d08767

Browse files
committed
pre-commit fixes
1 parent 0796753 commit 1d08767

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

binderhub/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@
5656
from .ratelimit import RateLimiter
5757
from .registry import DockerRegistry
5858
from .repoproviders import (
59-
MecaRepoProvider,
6059
DataverseProvider,
6160
FigshareProvider,
6261
GistRepoProvider,
6362
GitHubRepoProvider,
6463
GitLabRepoProvider,
6564
GitRepoProvider,
6665
HydroshareProvider,
66+
MecaRepoProvider,
6767
RepoProvider,
6868
ZenodoProvider,
6969
)

binderhub/repoproviders.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
import time
1616
import urllib.parse
1717
from datetime import datetime, timedelta, timezone
18-
from urllib.parse import urlparse, urlunparse
1918
from hashlib import md5
19+
from urllib.parse import unquote, urlparse, urlunparse
2020

2121
import escapism
22+
import validators as val
2223
from prometheus_client import Gauge
2324
from tornado.httpclient import AsyncHTTPClient, HTTPError, HTTPRequest
2425
from tornado.httputil import url_concat
@@ -325,7 +326,9 @@ def get_hashed_slug(self, url, changes_with_content):
325326
stripped_url = urlunparse(
326327
(parsed_url.scheme, parsed_url.netloc, parsed_url.path, "", "", "")
327328
)
328-
return "meca-" + md5(f"{stripped_url}-{changes_with_content}".encode()).hexdigest()
329+
return (
330+
"meca-" + md5(f"{stripped_url}-{changes_with_content}".encode()).hexdigest()
331+
)
329332

330333
async def get_resolved_ref(self):
331334
# Check the URL is reachable

0 commit comments

Comments
 (0)