alvwin / ai_phishing_toolkit

0 stars 1 forks source link

Unify Functions with Similar Logic but Different Parameters #6

Open manudev-1 opened 1 week ago

manudev-1 commented 1 week ago

Issue: Unify Functions with Similar Logic but Different Parameters

Description

There are several functions in our codebase that perform the same or very similar operations but accept different sets of parameters. This leads to code duplication, making maintenance more challenging and increasing the likelihood of bugs. I am refering to single_user_cli and single_user or user_list_cli and user_list in LinkedinService and TwitterService

Problem

Proposed Solution

Tasks

  1. Identify all functions that have similar logic but different parameters.
  2. Design the unified function, considering all variations of parameters.
  3. Refactor the identified functions into the new unified function.
  4. Update the relevant parts of the codebase to use the new function.
  5. Write tests to ensure that the unified function works correctly with all parameter configurations.

Expected Benefits

alvwin commented 1 week ago

Will get to this at the end of next week