Skip to content

Clean up DuckDuckGo + ProtonDrive lint debt (remove dead media_to_html import)#903

Merged
abrignoni merged 1 commit into
mainfrom
cleanup-ddg-protondrive-lint
Jun 22, 2026
Merged

Clean up DuckDuckGo + ProtonDrive lint debt (remove dead media_to_html import)#903
abrignoni merged 1 commit into
mainfrom
cleanup-ddg-protondrive-lint

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Summary

DuckDuckGo and ProtonDrive were already @artifact_processor but carried a stale, never-called media_to_html import — the last legacy media references anywhere in the repo. Removing it forces lint-changed-files to 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)

  • 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 Exceptionexcept 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 exceptOSError and json.loads exceptValueError; keep the leveldb-open broad except with an inline disable; fix a 9-space indent.

Both

  • Add a standard # pylint: disable=W0613,W0631 header for the inherent @artifact_processor signature args and the source_path loop idiom (same convention used across ALEAPP artifacts).

Validation

  • ast.parse OK; 0 media_to_html references repo-wide (calls and imports).
  • pylint (CI config): 10.00/10 both (was 7.37 / 7.49).
  • PluginLoader: 558 (all functions still load).

…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.
@abrignoni abrignoni merged commit 0c34b42 into main Jun 22, 2026
2 checks passed
@abrignoni abrignoni deleted the cleanup-ddg-protondrive-lint branch June 22, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant