ScreenPyHQ / screenpy

Screenplay pattern base for Python automated UI test suites.
MIT License
27 stars 3 forks source link

#8: Enable flake8 annotations. #119

Closed perrygoy closed 9 months ago

perrygoy commented 10 months ago

Well we saved the best for last. This PR enables flake8-annotations and adds the mypy config disallow-untyped-defs to the tests directory. Phew!

This PR also removes the isort, pylint, and flake8 tools from the dev dependencies list, since we don't use them in linting anymore.

perrygoy commented 10 months ago

There are still a couple mypy issues that i'm having trouble figuring out:

mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

tests/test_resolutions.py:149: error: Argument 1 to "ContainsTheEntry" has incompatible type "str"; expected <nothing>  [arg-type]
tests/test_resolutions.py:149: error: Argument 2 to "ContainsTheEntry" has incompatible type "bool"; expected <nothing>  [arg-type]
tests/test_resolutions.py:161: error: Argument 1 to "ContainsTheEntry" has incompatible type "str"; expected <nothing>  [arg-type]
tests/test_resolutions.py:161: error: Argument 2 to "ContainsTheEntry" has incompatible type "bool"; expected <nothing>  [arg-type]
tests/test_resolutions.py:203: error: Need type annotation for "cti_matcher"  [var-annotated]

Until those are resolved, i'll leave this as a draft.

bandophahita commented 9 months ago

There are still a couple mypy issues that i'm having trouble figuring out:

This makes me think we need to update the github action to run mypy checks against the tests as well.

perrygoy commented 9 months ago

I'd like to release now, so i'm gonna use my privileges @bandophahita. If you have any concerns from this PR, let's address them in the next one!