Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
QuirrelForU committed Mar 6, 2025
1 parent c529036 commit 1ae1946
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
sys.path.append(str(pathlib.Path("..").resolve()))
sys.path.append(str(pathlib.Path("../").resolve()))

# import pomcorn # does not fail anymore # noqa: ERA001

# -- Project information ------------------------------------------------------
from datetime import datetime

project = "Pomcorn"
copyright = "2023, Saritasa" # noqa:A001
copyright = f"{datetime.now().year}, Saritasa" # noqa:A001
author = "Saritasa"

# -- General configuration ---------------------------------------------
Expand Down
21 changes: 13 additions & 8 deletions pomcorn/locators/base_locators.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
"""Module with `XPathLocator`.
Provide only `XPathLocator` because a locator of this type
is sufficient for all operations and
it also allows to combine locators with `/` operator.
It's better to use one type of locators for consistency.
Example:
# Search button inside base element
button_element_locator = base_locator / button_locator
"""

from __future__ import annotations

from collections.abc import Iterator
from typing import Literal, TypeVar

from selenium.webdriver.common.by import By

# Provide only `XPathLocator` because a locator of this type is sufficient for
# all operations and it also allows to combine locators with `/` operator.
# It's better to use one type of locators for consistency.
#
# Example:
# # Search button inside base element
# button_element_locator = base_locator / button_locator # noqa: ERA001


class Locator:
"""Base locator for looking for elements in page."""
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ ignore = [
"S101",
# https://docs.astral.sh/ruff/rules/non-pep695-type-alias/
"UP040",
# https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
"DTZ",
]


Expand Down
2 changes: 1 addition & 1 deletion tests/locators/test_get_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@pytest.mark.parametrize(
argnames=["index", "result"],
argvalues=[
[-2, f"({TEST_QUERY})[last()-1]"],
[-2, f"({TEST_QUERY})[last() - 1]"],
[-1, f"({TEST_QUERY})[last()]"],
[0, f"({TEST_QUERY})[1]"],
[1, f"({TEST_QUERY})[2]"],
Expand Down

0 comments on commit 1ae1946

Please sign in to comment.