This repository was archived by the owner on Aug 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222 incorrectly.
2323- ` operations_parameter_set_pairs ` moved to ` MemoryOrchestratorContext `
2424- Ignore generated files in ` docs/plugins/ `
25+ - Treat ` "~" ` as the the home directory rather than a literal
2526- Windows support by selecting ` asyncio.ProactorEventLoop ` and not using
2627 ` asyncio.FastChildWatcher ` .
2728
Original file line number Diff line number Diff line change @@ -84,8 +84,13 @@ def __init__(self, config):
8484 # TODO Just in case its a string. We should make it so that on
8585 # instantiation of an @config we convert properties to their correct
8686 # types.
87- if isinstance (getattr (self .config , "directory" , None ), str ):
88- self .config .directory = pathlib .Path (self .config .directory )
87+ directory = getattr (self .config , "directory" , None )
88+ if isinstance (directory , str ):
89+ directory = pathlib .Path (directory )
90+ if isinstance (directory , pathlib .Path ):
91+ # to treat "~" as the the home directory rather than a literal
92+ directory = directory .expanduser ().resolve ()
93+ self .config .directory = directory
8994
9095 def __call__ (self ) -> ModelContext :
9196 self ._make_config_directory ()
You can’t perform that action at this time.
0 commit comments