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

More type annotations? #1222

Open
tony opened this issue Dec 15, 2023 · 2 comments
Open

More type annotations? #1222

tony opened this issue Dec 15, 2023 · 2 comments

Comments

@tony
Copy link
Contributor

tony commented Dec 15, 2023

Request

I would be nice to have expanded type coverage.

History

Example scenario

Loosely, even if this isn't idiomatic splinter usage, I think the general benefits of annotations and typings still hold. I am fine to elaborate.

Specifically, I am running into any Any with BaseWebDriver's attribute .driver.

Where I have a function like:

def fill_helper(browser: BaseWebDriver, selectors_path: list[str], value: str) -> None:
    # ...
    pass

And mypy will raise:

.../test_website.py:31: error: Argument 1 to "fill_helper" becomes "Any" due to an unfollowed import  [no-any-unimported]
  • Selenium: 4.16.1
  • Splinter: 0.20.1

Not relevant, but happen to be using:

  • pytest: 7.4.3
  • pytest-splinter: 3.3.2
@fsouza
Copy link
Contributor

fsouza commented Jan 10, 2024

I'm a big +1 on this, but I don't think I'll have time to work on it on the short term. It is something we can make incremental progress though.

@Avasam
Copy link

Avasam commented Aug 25, 2024

Once annotations are complete, I'd lie to request adding a PEP 561 py.typed marker as well.

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

No branches or pull requests

3 participants