Orange-OpenSource / Orange-OpenSource/its-client
manage etsi magic values
@ymorin-orange is already working on this.
Since Dec 2, 2025.
- Dominant language
- Java
- Stars
- 19
- Forks
- 12
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 3
Description
Yeah, I don't like all those magic values either; that's indeed ugly... :-(
But I don't really want to introduce constants for each such values either: given each variable may have its own special value to define it is unavailable, that would make for a lot of contants, which would not be much better...
The ETSI.si2etsi() prototype is:
class ETSI:
def si2etsi(
value: float | None,
scale: float,
undef: Optional[int] = None,
validity_range: Optional[dict] = None,
out_of_range: Optional[int] = None,
) -> int:
In retrospect, I see two issues there:
- the
undefparameter should have been namedunavailable(orundefined) - the parameters should have been keyword-only, so when called, it would be obvious that the value being passed as
undefined(orunavailable) was exactly that: undefined (or unavailable).
So, I would like to address this in a followup change, if that's OK for you?
Originally posted by @ymorin-orange in https://github.com/Orange-OpenSource/its-client/pull/459#discussion_r2533118386
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.