Skip to content
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

Simplify browser setup #1108

Merged
merged 1 commit into from
Mar 23, 2025
Merged

Simplify browser setup #1108

merged 1 commit into from
Mar 23, 2025

Conversation

SmartManoj
Copy link
Contributor

Removed unnecessary checks.

@MagMueller
Copy link
Collaborator

We could even put the browser assignment outside?

@MagMueller MagMueller merged commit 514207a into browser-use:main Mar 23, 2025
1 check passed
@@ -199,14 +199,12 @@ def __init__(
# Browser setup
self.injected_browser = browser is not None
self.injected_browser_context = browser_context is not None
self.browser = browser if browser is not None else (None if browser_context else Browser())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

self.browser = browser or (None if browser_context else Browser())

Yes, but readability reduces.

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.

2 participants