Skip to content

Remove unused WAIT_TIMEOUT constant and unused WebDriverWait/EC imports from scrape_whatsapp_chats.py#3

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1772851723-remove-unused-wait-timeout
Open

Remove unused WAIT_TIMEOUT constant and unused WebDriverWait/EC imports from scrape_whatsapp_chats.py#3
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1772851723-remove-unused-wait-timeout

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Remove unused WAIT_TIMEOUT constant and orphaned imports

Summary

Removes dead code from scrape_whatsapp_chats.py that was left behind when commit eae4bc4 rewrote get_group_participants() and removed the WebDriverWait-based logic originally introduced in commit 0896d81.

Removed:

  • WAIT_TIMEOUT = 10 constant (unused, no code references it)
  • from selenium.webdriver.support.ui import WebDriverWait (unused import)
  • from selenium.webdriver.support import expected_conditions as EC (unused import)
  • NoSuchElementException and TimeoutException from the exceptions import line (also unused)
  • Stale WAIT_TIMEOUT entry from README Configuration section

StaleElementReferenceException is retained as it is actively used in the codebase.

Review & Testing Checklist for Human

  • Verify NoSuchElementException is truly unused — the original finding only flagged WAIT_TIMEOUT/WebDriverWait/EC, but this PR also removes NoSuchElementException and TimeoutException from the import. Grep the full file to confirm neither is referenced (e.g., in a try/except block further down).
  • Confirm no other code path references WAIT_TIMEOUT, WebDriverWait, or EC (a quick grep across the repo should suffice).
  • Note the minor trailing whitespace change on the last line of README.md — cosmetic only, no functional impact.

Notes

Remove WAIT_TIMEOUT (line 22), WebDriverWait import (line 11),
expected_conditions import (line 12), NoSuchElementException import,
and TimeoutException import. All were orphaned when commit eae4bc4
rewrote get_group_participants() and removed the WebDriverWait usage
introduced in commit 0896d81.

Also remove the stale WAIT_TIMEOUT entry from README Configuration
section since the constant has no effect.

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants