@@ -122,28 +122,28 @@ def user_desktop_dir(self) -> str:
122122 def user_projects_dir (self ) -> str :
123123 """:returns: projects directory tied to the user, from ``$XDG_PROJECTS_DIR`` if set, else platform default"""
124124 if path := os .environ .get ("XDG_PROJECTS_DIR" , "" ).strip ():
125- return os .path .expanduser (path ) # noqa: PTH111
125+ return os .path .expanduser (path ) # noqa: PTH111 # API returns str, not Path
126126 return super ().user_projects_dir
127127
128128 @property
129129 def user_publicshare_dir (self ) -> str :
130130 """:returns: public share directory tied to the user, from ``$XDG_PUBLICSHARE_DIR`` if set, else platform default"""
131131 if path := os .environ .get ("XDG_PUBLICSHARE_DIR" , "" ).strip ():
132- return os .path .expanduser (path ) # noqa: PTH111
132+ return os .path .expanduser (path ) # noqa: PTH111 # API returns str, not Path
133133 return super ().user_publicshare_dir
134134
135135 @property
136136 def user_templates_dir (self ) -> str :
137137 """:returns: templates directory tied to the user, from ``$XDG_TEMPLATES_DIR`` if set, else platform default"""
138138 if path := os .environ .get ("XDG_TEMPLATES_DIR" , "" ).strip ():
139- return os .path .expanduser (path ) # noqa: PTH111
139+ return os .path .expanduser (path ) # noqa: PTH111 # API returns str, not Path
140140 return super ().user_templates_dir
141141
142142 @property
143143 def user_fonts_dir (self ) -> str :
144144 """:returns: fonts directory tied to the user, from ``$XDG_DATA_HOME/fonts`` if set, else platform default"""
145145 if path := os .environ .get ("XDG_DATA_HOME" , "" ).strip ():
146- return os .path .join ( os . path . expanduser (path ), " fonts") # noqa: PTH111, PTH118
146+ return f" { os .path .expanduser (path )} / fonts" # noqa: PTH111 # API returns str, not Path
147147 return super ().user_fonts_dir
148148
149149 @property
0 commit comments