From 0f514a34b9135dbb45afb91f4fe5519a8c819331 Mon Sep 17 00:00:00 2001 From: Shail Shouryya Date: Sun, 3 May 2020 20:58:36 -0700 Subject: [PATCH] changes variable name from f -> file - addresses the following pylint error: C0103: Variable name f doesn't conform to snake_case naming style (invalid-name) --- yt_videos_list/selenium_macos.py | 4 ++-- yt_videos_list/selenium_windows.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yt_videos_list/selenium_macos.py b/yt_videos_list/selenium_macos.py index ab71a3e5..3363ac24 100644 --- a/yt_videos_list/selenium_macos.py +++ b/yt_videos_list/selenium_macos.py @@ -5,6 +5,6 @@ def browser_exists(browser): return browser in subprocess.getoutput('ls /Applications') def get_browser_version(browser): - with open (f'/Applications/{browser}.app/Contents/Info.plist') as f: - info_plist = f.read() + with open (f'/Applications/{browser}.app/Contents/Info.plist') as file: + info_plist = file.read() return re.search(r'CFBundleShortVersionString\s*([0-9\.]+)', info_plist)[1] diff --git a/yt_videos_list/selenium_windows.py b/yt_videos_list/selenium_windows.py index bd1aa22f..faee299b 100644 --- a/yt_videos_list/selenium_windows.py +++ b/yt_videos_list/selenium_windows.py @@ -32,8 +32,8 @@ def get_firefox_version(): def get_opera_version(): drive = get_drive_letter() user = get_user_name() - with open(rf'{drive}:\Users\{user}\AppData\Local\Programs\Opera\installation_status.json', 'r') as f: - opera = json.load(f) + with open(rf'{drive}:\Users\{user}\AppData\Local\Programs\Opera\installation_status.json', 'r') as file: + opera = json.load(file) return opera['_subfolder'] def get_chrome_version():