Skip to content

Commit

Permalink
Shut pylint up
Browse files Browse the repository at this point in the history
  • Loading branch information
rayluo committed Nov 12, 2021
1 parent 63be405 commit 69eef72
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions msal_extensions/cache_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import time
import logging
from distutils.version import LooseVersion
import warnings

import portalocker

Expand Down Expand Up @@ -58,7 +57,7 @@ def __enter__(self):
if not self._try_to_create_lock_file():
logger.warning("Process %d failed to create lock file", pid)
file_handle = self._lock.__enter__()
file_handle.write('{} {}'.format(pid, sys.argv[0]).encode('utf-8'))
file_handle.write('{} {}'.format(pid, sys.argv[0]).encode('utf-8')) # pylint: disable=consider-using-f-string
return file_handle

def __exit__(self, *args):
Expand All @@ -69,5 +68,5 @@ def __exit__(self, *args):
# file for itself.
os.remove(self._lockpath)
except OSError as ex: # pylint: disable=invalid-name
if ex.errno != errno.ENOENT and ex.errno != errno.EACCES:
if ex.errno not in (errno.ENOENT, errno.EACCES):
raise
9 changes: 4 additions & 5 deletions msal_extensions/osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ def __init__(self, exit_status):
self.exit_status = exit_status
# TODO: pylint: disable=fixme
# use SecCopyErrorMessageString to fetch the appropriate message here.
self.message = \
'{} ' \
'see https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacErrors.h'\
.format(self.exit_status)
self.message = (
'{} see https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacErrors.h' # pylint: disable=consider-using-f-string,line-too-long
.format(self.exit_status))

def _get_native_location(name):
# type: (str) -> str
Expand All @@ -33,7 +32,7 @@ def _get_native_location(name):
:param name: The name of the library to be loaded.
:return: The location of the library on a MacOS filesystem.
"""
return '/System/Library/Frameworks/{0}.framework/{0}'.format(name)
return '/System/Library/Frameworks/{0}.framework/{0}'.format(name) # pylint: disable=consider-using-f-string


# Load native MacOS libraries
Expand Down
2 changes: 1 addition & 1 deletion msal_extensions/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def load(self):
# This happens when a load() is called before a save().
# We map it into cross-platform error for unified catching.
raise PersistenceNotFound(
location="Service:{} Account:{}".format(
location="Service:{} Account:{}".format( # pylint: disable=consider-using-f-string
self._service_name, self._account_name),
message=(
"Keychain persistence not initialized. "
Expand Down

0 comments on commit 69eef72

Please sign in to comment.