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 2121 python-version : ${{ matrix.python-version }}
2222 - name : Install uv
2323 run : make install-uv
24+ - name : Run Checks
25+ run : make check
2426 - 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 11.PHONY : Commands for developers
22
33.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
75
86.PHONY : check
97check : check-lint check-format
108
119.PHONY : check-lint
1210check-lint :
1311 uv run ruff check .
12+ uv run mypy appium
1413
1514.PHONY : check-format
1615check-format :
Original file line number Diff line number Diff line change @@ -483,18 +483,32 @@ or add it to PATH:
483483export "PATH=/venv/root/folder/bin:$PATH"
484484```
485485
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+
486500### Testing
487501
488502#### Unit
489503
490504```bash
491- uv run pytest test/unit
505+ make unittest
492506```
493507
494508Run in parallel (2 threads)
495509
496510```bash
497- uv run pytest -n 2 test/unit
511+ make unittest ARGS=" -n 2"
498512```
499513
500514#### Functional
Original file line number Diff line number Diff line change 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
1717from selenium .webdriver .remote .switch_to import SwitchTo
1818from typing_extensions import Self
1919
20- from appium .protocols .webdriver .can_execute_commands import CanExecuteCommands
21-
2220from .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.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,19 +13,20 @@ dynamic = [
1313requires-python = " >=3.9"
1414dependencies = [
1515 " selenium>=4.26,<5.0" ,
16- " typing-extensions~=4.13.2 " ,
16+ " typing-extensions~=4.13" ,
1717]
1818
1919[tool .uv ]
2020dev-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
You can’t perform that action at this time.
0 commit comments