Skip to content

Commit

Permalink
fix(type-hint): Correct validate_project_name type-hint
Browse files Browse the repository at this point in the history
  • Loading branch information
augustebaum committed Oct 11, 2024
1 parent 4fe2b30 commit 1e4ebaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skore/src/skore/cli/create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import re
from pathlib import Path
from typing import Optional, Union

from skore.cli import logger
from typing import Optional, Union


class ProjectNameTooLong(Exception):
Expand All @@ -26,7 +26,7 @@ class ImproperProjectName(Exception):
"""


def validate_project_name(project_name: str) -> Union[bool, Exception, None]:
def validate_project_name(project_name: str) -> tuple[bool, Optional[Exception]]:
"""Validate the project name (the part before ".skore").
Returns `(True, None)` if validation succeeded and `(False, Exception(...))`
Expand Down

0 comments on commit 1e4ebaa

Please sign in to comment.