File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 55import time
66import logging
77from distutils .version import LooseVersion
8- import warnings
98
109import portalocker
1110
@@ -58,7 +57,7 @@ def __enter__(self):
5857 if not self ._try_to_create_lock_file ():
5958 logger .warning ("Process %d failed to create lock file" , pid )
6059 file_handle = self ._lock .__enter__ ()
61- file_handle .write ('{} {}' .format (pid , sys .argv [0 ]).encode ('utf-8' ))
60+ file_handle .write ('{} {}' .format (pid , sys .argv [0 ]).encode ('utf-8' )) # pylint: disable=consider-using-f-string
6261 return file_handle
6362
6463 def __exit__ (self , * args ):
@@ -69,5 +68,5 @@ def __exit__(self, *args):
6968 # file for itself.
7069 os .remove (self ._lockpath )
7170 except OSError as ex : # pylint: disable=invalid-name
72- if ex .errno != errno .ENOENT and ex . errno != errno .EACCES :
71+ if ex .errno not in ( errno .ENOENT , errno .EACCES ) :
7372 raise
Original file line number Diff line number Diff line change @@ -21,10 +21,9 @@ def __init__(self, exit_status):
2121 self .exit_status = exit_status
2222 # TODO: pylint: disable=fixme
2323 # use SecCopyErrorMessageString to fetch the appropriate message here.
24- self .message = \
25- '{} ' \
26- 'see https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacErrors.h' \
27- .format (self .exit_status )
24+ self .message = (
25+ '{} see https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacErrors.h' # pylint: disable=consider-using-f-string,line-too-long
26+ .format (self .exit_status ))
2827
2928def _get_native_location (name ):
3029 # type: (str) -> str
@@ -33,7 +32,7 @@ def _get_native_location(name):
3332 :param name: The name of the library to be loaded.
3433 :return: The location of the library on a MacOS filesystem.
3534 """
36- return '/System/Library/Frameworks/{0}.framework/{0}' .format (name )
35+ return '/System/Library/Frameworks/{0}.framework/{0}' .format (name ) # pylint: disable=consider-using-f-string
3736
3837
3938# Load native MacOS libraries
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ def load(self):
227227 # This happens when a load() is called before a save().
228228 # We map it into cross-platform error for unified catching.
229229 raise PersistenceNotFound (
230- location = "Service:{} Account:{}" .format (
230+ location = "Service:{} Account:{}" .format ( # pylint: disable=consider-using-f-string
231231 self ._service_name , self ._account_name ),
232232 message = (
233233 "Keychain persistence not initialized. "
You can’t perform that action at this time.
0 commit comments