Skip to content

Commit

Permalink
🐛 Take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatXliner committed Jan 1, 2025
1 parent 969b224 commit 5b2a7e9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
contents: write
needs:
- build
steps:
Expand Down
2 changes: 1 addition & 1 deletion aioudp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
__all__ = ["connect", "serve", "Connection", "exceptions"]


__version__ = "2.0.0-beta3"
__version__ = "2.0.0-beta4"
4 changes: 2 additions & 2 deletions aioudp/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Connection: # TODO(ThatXliner): REFACTOR: minimal args
recv_func: Callable[[], Awaitable[bytes | None]]
is_closing: Callable[[], bool]
get_local_addr: Callable[[], AddrType]
get_remote_addr: Callable[[], None | AddrType]
get_remote_addr: Callable[[], AddrType]
closed: bool = False

@property
Expand All @@ -38,7 +38,7 @@ def local_address(self) -> AddrType:
return self.get_local_addr()

@property
def remote_address(self) -> None | AddrType:
def remote_address(self) -> AddrType:
"""Returns the remote address of the connection. This is their IP.
.. seealso::
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "aioudp"
description = "A better API for asynchronous UDP"
authors = ["Bryan Hu <thatxliner@gmail.com>"]
version = "2.0.0-beta3"
version = "2.0.0-beta4"

readme = "README.md"
license = "GPL-3.0-or-later"
Expand Down
5 changes: 4 additions & 1 deletion tests/test_connections.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
from hypothesis import assume, given, settings, strategies as st
from hypothesis import assume, given, settings
from hypothesis import strategies as st

import aioudp
from aioudp import exceptions
Expand All @@ -16,6 +17,7 @@ async def one_time_echo_server(connection: aioudp.Connection) -> None:


@given(data=st.binary())
@settings(deadline=None)
@pytest.mark.asyncio
async def test_echo_server(data: bytes):
assume(data)
Expand All @@ -26,6 +28,7 @@ async def test_echo_server(data: bytes):


@given(data=st.binary())
@settings(deadline=None)
@pytest.mark.asyncio
async def test_recieve_closed_connection(data: bytes):
assume(data)
Expand Down

0 comments on commit 5b2a7e9

Please sign in to comment.