diff --git a/pkgs/clan-cli/clan_cli/webui/routers/root.py b/pkgs/clan-cli/clan_cli/webui/routers/root.py index 60a835900..059950603 100644 --- a/pkgs/clan-cli/clan_cli/webui/routers/root.py +++ b/pkgs/clan-cli/clan_cli/webui/routers/root.py @@ -13,7 +13,7 @@ router = APIRouter() async def root(path_name: str) -> Response: if path_name == "": path_name = "index.html" - filename = Path(os.path.normpath((asset_path() / path_name))) + filename = Path(os.path.normpath(asset_path() / path_name)) if not filename.is_relative_to(asset_path()): # prevent directory traversal diff --git a/pkgs/clan-cli/clan_cli/zerotier/__init__.py b/pkgs/clan-cli/clan_cli/zerotier/__init__.py index 597f061f8..6269d7e2e 100644 --- a/pkgs/clan-cli/clan_cli/zerotier/__init__.py +++ b/pkgs/clan-cli/clan_cli/zerotier/__init__.py @@ -20,7 +20,7 @@ def try_bind_port(port: int) -> bool: tcp.bind(("127.0.0.1", port)) udp.bind(("127.0.0.1", port)) return True - except socket.error: + except OSError: return False diff --git a/pkgs/clan-cli/pyproject.toml b/pkgs/clan-cli/pyproject.toml index facbf9f9a..c6f98573f 100644 --- a/pkgs/clan-cli/pyproject.toml +++ b/pkgs/clan-cli/pyproject.toml @@ -46,7 +46,7 @@ ignore_missing_imports = true [tool.ruff] line-length = 88 -select = [ "E", "F", "I" ] +select = [ "E", "F", "I", "U"] ignore = [ "E501" ] [tool.black]