Skip to content

Conversation

@yateesh-reddy
Copy link

  • Improved Documentation: Updated the documentation for the SB context manager in SeleniumBase. The docstring now provides clear explanations for all parameters, including their types and how they should be used. This makes it easier for users to understand what each parameter does and how to use them effectively.

  • Enhanced Type Hinting: Refined the type hints for the SB context manager. This helps make the code more readable and ensures better type checking, which can prevent errors and make the function easier to work with.

  • Grammar and Style Fixes: Made grammar and style improvements to the docstring to ensure it is clear and easy to read. This includes fixing sentence structure and ensuring consistency in the descriptions of the parameters.

@mdmintz
Copy link
Member

mdmintz commented Aug 9, 2024

Hello! Python 3.7 is still supported. Your typing changes would lead to errors:
(See https://stackoverflow.com/a/61206514/7058266)

from typing import Any, Dict, Literal, Callable, Optional
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'Literal' from 'typing' (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py)

Additionally, SeleniumBase uses flake8 as a code-linter. Your code would fail checks from line-lengths (and maybe more).

Until Python 3.8 becomes the minimum version allowed (when the SeleniumBase Team makes that decision), there likely won't be any typing added (or accepted). Also, if we were to add typing, it would probably be throughout all the plugins, and not just for the sb manager.

There's lots of useful code in your PR, so it'll definitely be saved for later to help with the typing overhaul for that future time, so thank you for submitting that. In the meantime, I'll close this out for now. Due to the trickiness of accepting outside contributions (mainly because of the complexity of SeleniumBase, as you have seen), we generally follow the model of https://github.com/readme/featured/how-open-is-open-source, but with some limited exceptions to the policy of "open source, but closed to contributions", generally only on invitation.

@mdmintz mdmintz closed this Aug 9, 2024
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