Skip to content

Commit

Permalink
Merge pull request #205 from anthonywritescode/pre-commit-ci-update-c…
Browse files Browse the repository at this point in the history
…onfig

[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
asottile authored Jul 30, 2024
2 parents ff35401 + 908806b commit 6f6db94
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py310-plus]
Expand Down
4 changes: 2 additions & 2 deletions bot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def connect(
config: Config,
*,
quiet: bool,
) -> tuple[AsyncGenerator[bytes, None], asyncio.StreamWriter]:
) -> tuple[AsyncGenerator[bytes], asyncio.StreamWriter]:
async def _new_conn() -> tuple[asyncio.StreamReader, asyncio.StreamWriter]:
reader, writer = await asyncio.open_connection(HOST, PORT, ssl=True)

Expand All @@ -95,7 +95,7 @@ async def _new_conn() -> tuple[asyncio.StreamReader, asyncio.StreamWriter]:

reader, writer = await _new_conn()

async def next_line() -> AsyncGenerator[bytes, None]:
async def next_line() -> AsyncGenerator[bytes]:
nonlocal reader, writer

while not writer.is_closing():
Expand Down
2 changes: 1 addition & 1 deletion bot/parse_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _replace_cheer(
s: str,
cheer_info: Mapping[str, CheerInfo],
cheer_regex: re.Pattern[str],
) -> Generator[str | Emote | Cheer, None, None]:
) -> Generator[str | Emote | Cheer]:
pos = 0
for match in cheer_regex.finditer(s):
yield s[pos:match.start()]
Expand Down
2 changes: 1 addition & 1 deletion bot/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def seconds_to_readable(seconds: int) -> str:


@contextlib.contextmanager
def atomic_open(filename: str) -> Generator[IO[bytes], None, None]:
def atomic_open(filename: str) -> Generator[IO[bytes]]:
fd, fname = tempfile.mkstemp(dir=os.path.dirname(filename))
try:
with open(fd, 'wb') as f:
Expand Down

0 comments on commit 6f6db94

Please sign in to comment.