Clean up DuckDuckGo + ProtonDrive lint debt (remove dead media_to_html import)#903
Merged
Conversation
…l import) Both files were already @artifact_processor and carried a stale, never-called media_to_html import (the last legacy media references in the repo). Removing it forces lint-changed-files to lint the whole file, so this also resolves the pre-existing pylint warnings to keep CI green: ProtonDrive (7.37 -> 10.00): - Drop unused imports (os, datetime, check_in_media, open_sqlite_db_readonly, get_file_path, media_to_html, logfunc, duplicate is_platform_windows). - Narrow file-header except Exception -> OSError; fix a 9-space indent; drop two unused row unpackings (share_id, parent_id). DuckDuckGo (7.49 -> 10.00): - Drop unused imports (inspect, sqlite3, media_to_html, open_sqlite_db_readonly, logfunc, duplicate is_platform_windows) and two unused inspect.stack() vars. - Remove in-function reimports (inspect/Path/datetime) that shadowed the module imports; use datetime.datetime.strptime consistently. - Narrow file-header except -> OSError and json.loads except -> ValueError; keep the leveldb-open broad except with an inline disable; fix a 9-space indent. Both: add a standard 'pylint: disable' header for the inherent artifact_processor signature args (W0613) and the source_path loop idiom (W0631). No behavior change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DuckDuckGoandProtonDrivewere already@artifact_processorbut carried a stale, never-calledmedia_to_htmlimport — the last legacy media references anywhere in the repo. Removing it forceslint-changed-filesto lint the whole file, so this also resolves each file's pre-existing pylint warnings to keep CI green. No behavior change.ProtonDrive (7.37 → 10.00)
os,datetime,check_in_media,open_sqlite_db_readonly,get_file_path,media_to_html,logfunc, duplicateis_platform_windows).except Exception→except OSError; fix a 9-space indent; drop two unused row unpackings (share_id,parent_id).DuckDuckGo (7.49 → 10.00)
inspect,sqlite3,media_to_html,open_sqlite_db_readonly,logfunc, duplicateis_platform_windows) and two unusedinspect.stack()vars.inspect/Path/datetime) that shadowed the module imports; usedatetime.datetime.strptimeconsistently.except→OSErrorandjson.loadsexcept→ValueError; keep the leveldb-open broadexceptwith an inline disable; fix a 9-space indent.Both
# pylint: disable=W0613,W0631header for the inherent@artifact_processorsignature args and thesource_pathloop idiom (same convention used across ALEAPP artifacts).Validation
ast.parseOK; 0media_to_htmlreferences repo-wide (calls and imports).