From 7c3291885416f4259f38397d12f209321c612944 Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Fri, 27 Mar 2020 17:31:18 -0700 Subject: [PATCH] :snake: Remove unused `filename_key` argument --- detect_secrets/core/secrets_collection.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/detect_secrets/core/secrets_collection.py b/detect_secrets/core/secrets_collection.py index a3ee549ef..bd7061803 100644 --- a/detect_secrets/core/secrets_collection.py +++ b/detect_secrets/core/secrets_collection.py @@ -210,28 +210,21 @@ def scan_diff( ), ) - def scan_file(self, filename, filename_key=None): + def scan_file(self, filename): """Scans a specified file, and adds information to self.data :type filename: str :param filename: full path to file to scan. - :type filename_key: str - :param filename_key: key to store in self.data - :returns: boolean; though this value is only used for testing """ - - if not filename_key: - filename_key = filename - if os.path.islink(filename): return False if os.path.splitext(filename)[1] in IGNORED_FILE_EXTENSIONS: return False try: with codecs.open(filename, encoding='utf-8') as f: - self._extract_secrets_from_file(f, filename_key) + self._extract_secrets_from_file(f, filename) return True except IOError: