Skip to content

refactor: pydoll v2 #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 136 commits into
base: main
Choose a base branch
from
Open

refactor: pydoll v2 #132

wants to merge 136 commits into from

Conversation

thalissonvs
Copy link
Member

Refactoring Pull Request

Refactoring Scope

All codebase

Description

This refactoring aims to facilitate future maintenance. The file structure was reorganized for better readability, and type hints were added to improve robustness.

API Changes

  • No changes to public API
  • Public API changed, but backward compatible
  • Breaking changes to public API

Testing Checklist

  • Existing tests updated
  • New tests added for previously uncovered cases
  • All tests pass
  • Code coverage maintained or improved

Checklist before requesting a review

  • My code follows the style guidelines of this project
  • I have performed a thorough self-review of the refactored code
  • I have commented my code, particularly in complex areas
  • I have updated documentation if needed
  • I have run poetry run task lint and fixed any issues
  • I have run poetry run task test and all tests pass
  • My commits follow the conventional commits style

@thalissonvs thalissonvs self-assigned this May 28, 2025
Comment on lines +90 to +91
else:
raise InvalidOptionsObject()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

if response['result']['result']['value'] == 'complete':
break
if asyncio.get_event_loop().time() - start_time > timeout:
raise asyncio.TimeoutError('Page load timed out')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create a custom exception

@thalissonvs thalissonvs requested a review from cleitonleonel May 28, 2025 06:40
@cleitonleonel
Copy link
Collaborator

Refactoring Pull Request

Refactoring Scope

All codebase

Description

This refactoring aims to facilitate future maintenance. The file structure was reorganized for better readability, and type hints were added to improve robustness.

API Changes

  • No changes to public API
  • Public API changed, but backward compatible
  • Breaking changes to public API

Testing Checklist

  • Existing tests updated
  • New tests added for previously uncovered cases
  • All tests pass
  • Code coverage maintained or improved

Checklist before requesting a review

  • My code follows the style guidelines of this project
  • I have performed a thorough self-review of the refactored code
  • I have commented my code, particularly in complex areas
  • I have updated documentation if needed
  • I have run poetry run task lint and fixed any issues
  • I have run poetry run task test and all tests pass
  • My commits follow the conventional commits style

Hi, there are many changes and a major refactoring. First of all, I would like to thank you for your commitment and dedication in keeping this project active. The changes seem very good to me, at least in the critical parts of the keyboard events module, the clarity obtained with this refactoring is very clear, but your tests seem to break when importing the commands module:

tests/test_browser_commands.py:1: in <module>
from pydoll.protocol.commands import BrowserCommands
E ModuleNotFoundError: No module named 'pydoll.protocol.commands'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants