ref: Remove property setters from dataclass
Removed the property setters and getters from variables with complex
defaults. Instead, they are now given a specific const default value
`Path("%%%%I_DONT_EXIST_%%%%")` which is very unlikely to be used by a user
in normal circumstances.
This is necessary to be able to remove the properties since Python does
not distinguish between an empty Path() and a non-given Path() (i.e.
there is no Path value which returns Falsy).
However, this slightly clunky construct does allow setting the various
Paths once and only once, and also to remove all the previously
necessary getters and setters with their hidden backing variables.
Lastly it should open the gates for changing the _real_path
transformation to be part of the TConf class itself and not a global
function.
This commit is contained in:
parent
b0a71e804d
commit
7dbd93796d
2 changed files with 25 additions and 33 deletions
|
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Default paths are only calculated once, though users can now not use specifically '%%%%I_DONT_EXIST_%%%%' as a path for the taskrc file and task data directory.
|
||||
|
||||
## [0.2.0] - 2025-04-09
|
||||
|
||||
### Added
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue