@@ -247,7 +247,7 @@ def acquire(
247247 check_interval : typing .Optional [float ] = None ,
248248 fail_when_locked : typing .Optional [bool ] = None ,
249249 ) -> typing .IO [typing .AnyStr ]:
250- """ Acquire the locked filehandle"""
250+ ''' Acquire the locked filehandle'''
251251
252252 fail_when_locked = coalesce (fail_when_locked , self .fail_when_locked )
253253
@@ -316,14 +316,14 @@ def __enter__(self) -> typing.IO[typing.AnyStr]:
316316 return self .acquire ()
317317
318318 def release (self ):
319- """ Releases the currently locked file handle"""
319+ ''' Releases the currently locked file handle'''
320320 if self .fh :
321321 portalocker .unlock (self .fh )
322322 self .fh .close ()
323323 self .fh = None
324324
325325 def _get_fh (self ) -> types .IO :
326- """ Get a new filehandle"""
326+ ''' Get a new filehandle'''
327327 return typing .cast (
328328 types .IO ,
329329 open ( # noqa: SIM115
@@ -334,20 +334,20 @@ def _get_fh(self) -> types.IO:
334334 )
335335
336336 def _get_lock (self , fh : types .IO ) -> types .IO :
337- """
337+ '''
338338 Try to lock the given filehandle
339339
340- returns LockException if it fails"""
340+ returns LockException if it fails'''
341341 portalocker .lock (fh , self .flags )
342342 return fh
343343
344344 def _prepare_fh (self , fh : types .IO ) -> types .IO :
345- """
345+ '''
346346 Prepare the filehandle for usage
347347
348348 If truncate is a number, the file will be truncated to that amount of
349349 bytes
350- """
350+ '''
351351 if self .truncate :
352352 fh .seek (0 )
353353 fh .truncate (0 )
@@ -356,11 +356,11 @@ def _prepare_fh(self, fh: types.IO) -> types.IO:
356356
357357
358358class RLock (Lock ):
359- """
359+ '''
360360 A reentrant lock, functions in a similar way to threading.RLock in that it
361361 can be acquired multiple times. When the corresponding number of release()
362362 calls are made the lock will finally release the underlying file lock.
363- """
363+ '''
364364
365365 def __init__ (
366366 self ,
0 commit comments