Skip to content

Commit

Permalink
pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejpurves committed Jun 3, 2024
1 parent 0796753 commit 1d08767
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion binderhub/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
from .ratelimit import RateLimiter
from .registry import DockerRegistry
from .repoproviders import (
MecaRepoProvider,
DataverseProvider,
FigshareProvider,
GistRepoProvider,
GitHubRepoProvider,
GitLabRepoProvider,
GitRepoProvider,
HydroshareProvider,
MecaRepoProvider,
RepoProvider,
ZenodoProvider,
)
Expand Down
7 changes: 5 additions & 2 deletions binderhub/repoproviders.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
import time
import urllib.parse
from datetime import datetime, timedelta, timezone
from urllib.parse import urlparse, urlunparse
from hashlib import md5
from urllib.parse import unquote, urlparse, urlunparse

import escapism
import validators as val
from prometheus_client import Gauge
from tornado.httpclient import AsyncHTTPClient, HTTPError, HTTPRequest
from tornado.httputil import url_concat
Expand Down Expand Up @@ -325,7 +326,9 @@ def get_hashed_slug(self, url, changes_with_content):
stripped_url = urlunparse(
(parsed_url.scheme, parsed_url.netloc, parsed_url.path, "", "", "")
)
return "meca-" + md5(f"{stripped_url}-{changes_with_content}".encode()).hexdigest()
return (
"meca-" + md5(f"{stripped_url}-{changes_with_content}".encode()).hexdigest()
)

async def get_resolved_ref(self):
# Check the URL is reachable
Expand Down

0 comments on commit 1d08767

Please sign in to comment.