Skip to content

Commit

Permalink
* RET
Browse files Browse the repository at this point in the history
  • Loading branch information
bandophahita committed Feb 2, 2024
1 parent c0b87f0 commit e3b31d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ select = [
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
# "Q", # flake8-quotes
# "RET", # flake8-return
"Q", # flake8-quotes
"RET", # flake8-return
# "RSE", # flake8-raise
# "RUF", # ruff specific
# "SIM", # flake8-simplify
Expand Down Expand Up @@ -172,6 +172,7 @@ extend-safe-fixes = [
"C419",
"D200", "D205", "D415",
"PT003", "PT006", "PT018",
"RET504",
]

[tool.ruff.lint.per-file-ignores]
Expand Down
6 changes: 2 additions & 4 deletions tests/useful_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ def get_mocked_chain() -> mock.Mock:
def get_mock_target_class() -> type:
class FakeTarget(Target):
def __new__(cls, *args: object, **kwargs: object) -> FakeTarget: # noqa: ARG003
rt = mock.create_autospec(FakeTarget, instance=True)
return rt
return mock.create_autospec(FakeTarget, instance=True)

return FakeTarget

Expand All @@ -38,8 +37,7 @@ def get_mocked_target_and_element() -> Tuple[mock.Mock, mock.Mock]:


def get_mocked_browser(actor: Actor) -> mock.Mock:
browser = cast(mock.Mock, actor.ability_to(BrowseTheWeb).browser)
return browser
return cast(mock.Mock, actor.ability_to(BrowseTheWeb).browser)


def get_mocked_webdriver() -> mock.Mock:
Expand Down

0 comments on commit e3b31d1

Please sign in to comment.