Skip to content

Commit

Permalink
Bump mypy, black, isort, and ruff. (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel authored Oct 2, 2023
1 parent 2fa82ea commit b6478fa
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 34 deletions.
1 change: 1 addition & 0 deletions changelog.d/349.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump development dependencies.
27 changes: 0 additions & 27 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,9 @@ show_error_codes = True
show_traceback = True
mypy_path = stubs

[mypy-idna]
ignore_missing_imports = True

[mypy-OpenSSL]
ignore_missing_imports = True

[mypy-twisted.*]
ignore_missing_imports = True

[mypy-jaeger_client]
ignore_missing_imports = True

[mypy-aioapns]
ignore_missing_imports = True

[mypy-aioapns.common]
ignore_missing_imports = True

[mypy-service_identity.*]
ignore_missing_imports = True

[mypy-prometheus_client]
ignore_missing_imports = True

[mypy-setuptools]
ignore_missing_imports = True

[mypy-OpenSSL.*]
ignore_missing_imports = True

[mypy-py_vapid]
ignore_missing_imports = True

Expand Down
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,17 @@ dependencies = [

[project.optional-dependencies]
dev = [
"black==22.3.0",
"black==23.9.1",
"coverage~=5.5",
"ruff==0.0.262",
"isort~=5.0",
"mypy==0.812",
"mypy-zope==0.3.0",
"ruff==0.0.291",
"isort~=5.10",
"mypy==1.5.1",
"mypy-zope==1.0.1",
"towncrier",
"tox",
"types-opentracing>=2.4.2",
"types-pyOpenSSL",
"types-PyYAML",
"typing-extensions>=3.7.4",
]

Expand Down
3 changes: 2 additions & 1 deletion sygnal/helper/proxy/proxy_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ async def switch_over_when_ready(self) -> Tuple[BaseTransport, Protocol]:

# start_tls does NOT call connection_made on new_protocol, so we
# must do it ourselves
assert transport
buffered_protocol.connection_made(transport)
else:
# no wrapping required for non-TLS
Expand Down Expand Up @@ -326,7 +327,7 @@ def make_protocol() -> HttpConnectProtocol:
# (N.B. if we want to ever use TLS to the proxy [e.g. to protect the proxy
# credentials], we can ask this to give us a TLS connection).

transport, connect_protocol = await self._wrapped_loop.create_connection(
_, connect_protocol = await self._wrapped_loop.create_connection(
make_protocol, proxy_url_parts.hostname, proxy_url_parts.port
)

Expand Down
1 change: 1 addition & 0 deletions sygnal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class NotificationLoggerAdapter(LoggerAdapter):
def process(
self, msg: str, kwargs: MutableMapping[str, Any]
) -> Tuple[str, MutableMapping[str, Any]]:
assert self.extra
return f"[{self.extra['request_id']}] {msg}", kwargs


Expand Down
4 changes: 3 additions & 1 deletion tests/asyncio_test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ def pause_reading(self) -> None:
def resume_reading(self) -> None:
pass # NOP

def set_write_buffer_limits(self, high: int = None, low: int = None) -> None:
def set_write_buffer_limits(
self, high: Optional[int] = None, low: Optional[int] = None
) -> None:
pass # NOP

def get_write_buffer_size(self) -> int:
Expand Down

0 comments on commit b6478fa

Please sign in to comment.