-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
765e8eb
commit cbd9291
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
date: 2025-01-14 | ||
decision-makers: ["@augustebaum", "@thomass-dev"] | ||
--- | ||
|
||
# Use `typing.Union` rather than `|` in type hints | ||
|
||
## Context and Problem Statement | ||
|
||
This ADR originates from a discussion in [this PR comment](https://github.com/probabl-ai/skore/pull/1084#discussion_r1914402895). | ||
|
||
Writing a union type using `|` is [only available from Python 3.10](https://docs.python.org/3.12/library/typing.html#typing.Union), while we currently intend to support Python 3.9. | ||
Even though we do not formally check type-hints using automatic tools like `mypy`, we still strive for consistency for style issues of this kind. | ||
|
||
## Decision Outcome | ||
|
||
Use `typing.Union` rather than `|` in type hints. |