Skip to content

chore: remove redundant code #759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ repos:
- id: check-toml
- id: requirements-txt-fixer
- repo: https://github.com/psf/black
rev: 21.5b1
rev: 21.6b0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
rev: v0.902
hooks:
- id: mypy
- repo: https://gitlab.com/pycqa/flake8
Expand Down
10 changes: 5 additions & 5 deletions local-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
auditwheel==4.0.0
autobahn==21.3.1
black==21.5b1
black==21.6b0
flake8==3.9.2
flaky==3.7.0
mypy==0.812
mypy==0.902
objgraph==3.5.0
pandas==1.2.4
Pillow==8.2.0
pixelmatch==0.2.3
pre-commit==2.12.1
pre-commit==2.13.0
pyOpenSSL==20.0.1
pytest==6.2.4
pytest-asyncio==0.15.1
pytest-cov==2.12.0
pytest-cov==2.12.1
pytest-repeat==0.9.1
pytest-sugar==0.9.4
pytest-timeout==1.4.2
pytest-xdist==2.2.1
requests==2.25.1
service_identity==21.1.0
setuptools==56.2.0
setuptools==57.0.0
twine==3.4.1
twisted==21.2.0
wheel==0.36.2
2 changes: 1 addition & 1 deletion playwright/_impl/_js_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def serialize_value(value: Any, handles: List[JSHandle], depth: int) -> Any:
return dict(a=result)

if isinstance(value, dict):
result = [] # type: ignore
result = []
for name in value:
result.append(
{"k": name, "v": serialize_value(value[name], handles, depth + 1)}
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_async_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import inspect
import re
from types import FunctionType
from typing import Any, get_type_hints # type: ignore
from typing import Any, get_type_hints

from playwright._impl._helper import to_snake_case
from scripts.documentation_provider import DocumentationProvider
Expand Down Expand Up @@ -59,7 +59,7 @@ def generate(t: Any) -> None:
for [name, value] in t.__dict__.items():
if name.startswith("_"):
continue
if not name.startswith("_") and str(value).startswith("<property"):
if str(value).startswith("<property"):
value = value.fget
print("")
print(" @property")
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_sync_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import re
import sys
from types import FunctionType
from typing import Any, get_type_hints # type: ignore
from typing import Any, get_type_hints

from playwright._impl._helper import to_snake_case
from scripts.documentation_provider import DocumentationProvider
Expand Down Expand Up @@ -60,7 +60,7 @@ def generate(t: Any) -> None:
for [name, value] in t.__dict__.items():
if name.startswith("_"):
continue
if not name.startswith("_") and str(value).startswith("<property"):
if str(value).startswith("<property"):
value = value.fget
print("")
print(" @property")
Expand Down
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ junit_family=xunit2
[mypy]
ignore_missing_imports = True
python_version = 3.7
warn_unused_ignores = False
warn_unused_ignores = True
warn_redundant_casts = True
warn_unused_configs = True
check_untyped_defs = True
disallow_untyped_defs = True
[mypy-tests.*]
check_untyped_defs = False
disallow_untyped_defs = False
ignore_errors = True
[flake8]
ignore =
E501
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def __init__(
node_executable = driver_dir / "node"
cli_js = driver_dir / "package" / "lib" / "cli" / "cli.js"
tmpfile.write_text(json.dumps(launch_server_options))
self.process = subprocess.Popen( # type: ignore
self.process = subprocess.Popen(
[
str(node_executable),
str(cli_js),
Expand Down