comparison configmix/config.py @ 374:4d7ad20cb8f9

FIX: Doc strings
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 11 Jul 2021 17:28:01 +0200
parents 0c65aac81807
children bb4a90fb58e0
comparison
equal deleted inserted replaced
373:0c65aac81807 374:4d7ad20cb8f9
220 return int(s, 0) 220 return int(s, 0)
221 else: 221 else:
222 return s 222 return s
223 223
224 def getfirstintvar_s(self, *varnames, **kwds): 224 def getfirstintvar_s(self, *varnames, **kwds):
225 """Get a (possibly substituted) variable and coerce text to a 225 """A variant of :meth:`~.getintvar_s` that returns the first found
226 number. 226 variable in the list of given variables in `varnames`.
227 227
228 """ 228 """
229 s = self.getfirstvar_s(*varnames, **kwds) 229 s = self.getfirstvar_s(*varnames, **kwds)
230 if isinstance(s, self._TEXTTYPE): 230 if isinstance(s, self._TEXTTYPE):
231 return int(s, 0) 231 return int(s, 0)
259 return self._BOOL_CVT[sl] 259 return self._BOOL_CVT[sl]
260 else: 260 else:
261 return s 261 return s
262 262
263 def getfirstboolvar_s(self, *varnames, **kwds): 263 def getfirstboolvar_s(self, *varnames, **kwds):
264 """Get a (possibly substituted) variable and convert text to a 264 """A variant of :meth:`~.getboolvar_s` that returns the first found
265 boolean 265 variable in the list of given variables in `varnames`.
266 266
267 """ 267 """
268 s = self.getfirstvar_s(*varnames, **kwds) 268 s = self.getfirstvar_s(*varnames, **kwds)
269 if isinstance(s, self._TEXTTYPE): 269 if isinstance(s, self._TEXTTYPE):
270 sl = s.strip().lower() 270 sl = s.strip().lower()