File tree Expand file tree Collapse file tree 7 files changed +99
-35
lines changed Expand file tree Collapse file tree 7 files changed +99
-35
lines changed Original file line number Diff line number Diff line change 21
21
python-version : ${{ matrix.python-version }}
22
22
- name : Install uv
23
23
run : make install-uv
24
+ - name : Run Checks
25
+ run : make check
24
26
- name : Run Unit Tests
25
- run : uv run pytest test/unit
27
+ run : make unittest
Original file line number Diff line number Diff line change 1
1
.PHONY : Commands for developers
2
2
3
3
.PHONY : check-all
4
- check-all : # # Run all lint checks and unittest
5
- @echo " [Notice] If you'd like to run commands with same env to CI, please run \` tox\` ."
6
- @bash ci.sh
4
+ check-all : check unittest
7
5
8
6
.PHONY : check
9
7
check : check-lint check-format
10
8
11
9
.PHONY : check-lint
12
10
check-lint :
13
11
uv run ruff check .
12
+ uv run mypy appium
14
13
15
14
.PHONY : check-format
16
15
check-format :
Original file line number Diff line number Diff line change @@ -483,18 +483,32 @@ or add it to PATH:
483
483
export "PATH=/venv/root/folder/bin:$PATH"
484
484
```
485
485
486
+ ### Linting And Formatting
487
+
488
+ Run linter and format checks
489
+
490
+ ```bash
491
+ make check
492
+ ```
493
+
494
+ Address autofixable linter and formatting issues
495
+
496
+ ```bash
497
+ make fix
498
+ ```
499
+
486
500
### Testing
487
501
488
502
#### Unit
489
503
490
504
```bash
491
- uv run pytest test/unit
505
+ make unittest
492
506
```
493
507
494
508
Run in parallel (2 threads)
495
509
496
510
```bash
497
- uv run pytest -n 2 test/unit
511
+ make unittest ARGS=" -n 2"
498
512
```
499
513
500
514
#### Functional
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- from typing import Optional , Protocol
15
+ from typing import Optional
16
16
17
17
from selenium .webdriver .remote .switch_to import SwitchTo
18
18
from typing_extensions import Self
19
19
20
- from appium .protocols .webdriver .can_execute_commands import CanExecuteCommands
21
-
22
20
from .mobilecommand import MobileCommand
23
21
24
22
25
- class HasDriver (Protocol ):
26
- _driver : CanExecuteCommands
27
-
28
-
29
- class MobileSwitchTo (SwitchTo , HasDriver ):
23
+ class MobileSwitchTo (SwitchTo ):
30
24
def context (self , context_name : Optional [str ]) -> Self :
31
25
"""Sets the context for the current session.
32
26
Passing `None` is equal to switching to native context.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,19 +13,20 @@ dynamic = [
13
13
requires-python = " >=3.9"
14
14
dependencies = [
15
15
" selenium>=4.26,<5.0" ,
16
- " typing-extensions~=4.13.2 " ,
16
+ " typing-extensions~=4.13" ,
17
17
]
18
18
19
19
[tool .uv ]
20
20
dev-dependencies = [
21
21
" httpretty~=1.1" ,
22
22
" mock~=5.2" ,
23
+ " mypy~=1.17" ,
23
24
" pre-commit~=4.2" ,
24
25
" pytest~=8.4" ,
25
26
" pytest-cov~=6.2" ,
26
27
" pytest-xdist~=3.8" ,
27
28
" python-dateutil~=2.9" ,
28
- " ruff~=0.12.7 " ,
29
+ " ruff~=0.12" ,
29
30
" types-python-dateutil~=2.9" ,
30
31
]
31
32
You can’t perform that action at this time.
0 commit comments