Skip to content

Commit b4e02e1

Browse files
fix: Restore mypy linting
1 parent 7af0fd4 commit b4e02e1

File tree

4 files changed

+79
-12
lines changed

4 files changed

+79
-12
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ check: check-lint check-format
1111
.PHONY: check-lint
1212
check-lint:
1313
uv run ruff check .
14+
uv run mypy appium
1415

1516
.PHONY: check-format
1617
check-format:

appium/webdriver/switch_to.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from typing import Optional, Protocol
15+
from typing import Optional
1616

1717
from selenium.webdriver.remote.switch_to import SwitchTo
1818
from typing_extensions import Self
1919

20-
from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
21-
2220
from .mobilecommand import MobileCommand
2321

2422

25-
class HasDriver(Protocol):
26-
_driver: CanExecuteCommands
27-
28-
29-
class MobileSwitchTo(SwitchTo, HasDriver):
23+
class MobileSwitchTo(SwitchTo):
3024
def context(self, context_name: Optional[str]) -> Self:
3125
"""Sets the context for the current session.
3226
Passing `None` is equal to switching to native context.

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@ dynamic = [
1313
requires-python = ">=3.9"
1414
dependencies = [
1515
"selenium>=4.26,<5.0",
16-
"typing-extensions~=4.13.2",
16+
"typing-extensions~=4.13",
1717
]
1818

1919
[tool.uv]
2020
dev-dependencies = [
2121
"httpretty~=1.1",
2222
"mock~=5.2",
23+
"mypy~=1.17",
2324
"pre-commit~=4.2",
2425
"pytest~=8.4",
2526
"pytest-cov~=6.2",
2627
"pytest-xdist~=3.8",
2728
"python-dateutil~=2.9",
28-
"ruff~=0.12.7",
29+
"ruff~=0.12",
2930
"types-python-dateutil~=2.9",
3031
]
3132

uv.lock

Lines changed: 73 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)