Fixed AnyURL problem
This commit is contained in:
@@ -12,7 +12,7 @@ from typing import Iterator
|
||||
# XXX: can we dynamically load this using nix develop?
|
||||
import uvicorn
|
||||
from pydantic import AnyUrl, IPvAnyAddress
|
||||
|
||||
from pydantic.tools import parse_obj_as
|
||||
from clan_cli.errors import ClanError
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -25,7 +25,9 @@ def open_browser(base_url: AnyUrl, sub_url: str) -> None:
|
||||
break
|
||||
except OSError:
|
||||
time.sleep(i)
|
||||
url = AnyUrl(f"{base_url}/{sub_url.removeprefix('/')}")
|
||||
url = parse_obj_as(
|
||||
AnyUrl, f"{base_url}/{sub_url.removeprefix('/')}"
|
||||
)
|
||||
_open_browser(url)
|
||||
|
||||
|
||||
|
||||
@@ -3,5 +3,8 @@
|
||||
"extends": ["next/core-web-vitals", "plugin:tailwindcss/recommended", "plugin:@typescript-eslint/recommended"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"ignorePatterns": ["**/src/api/*"]
|
||||
"ignorePatterns": ["**/src/api/*"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-explicit-any": "off"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
{
|
||||
packages = {
|
||||
ui = base.pkg.global;
|
||||
theme = base.pkg.theme;
|
||||
ui-assets = pkgs.callPackage ./nix/ui-assets.nix { };
|
||||
# EXAMPLE: GITEA_TOKEN=$(rbw get -f GITEA_TOKEN git.clan.lol) nix run .#update-ui-assets
|
||||
update-ui-assets = pkgs.callPackage ./nix/update-ui-assets.nix { };
|
||||
|
||||
Reference in New Issue
Block a user