Description
This issue addresses code quality improvements:
- Fix type annotations in
QUICErrorContext.__exit__
- Fix unnecessary return statement in
Mplex.send_message
- Add missing logging statements in Mplex message handling
Motivation
- Type safety: Current type annotations have errors (
| None | None duplicate, Any instead of TracebackType)
- Code clarity: Unnecessary
return and # type: ignore comments reduce readability
- Debuggability: Missing logging makes it hard to diagnose mplex stream issues in production
Current Implementation
QUIC exceptions (Line 354):
exc_type: type[BaseException] | None | None - redundant | None
exc_tb: Any - should be TracebackType | None
Mplex (Line 199):
return await self.write_to_stream(_bytes) # type: ignore
- Unnecessary return since
write_to_stream returns None
Mplex logging (Lines 280, 304, 310):
- 3 TODO comments for missing
logger.warning() calls
- Logger already exists in file, just needs the calls added
Are you planning to do it yourself in a pull request ?
Yes
Description
This issue addresses code quality improvements:
QUICErrorContext.__exit__Mplex.send_messageMotivation
| None | Noneduplicate,Anyinstead ofTracebackType)returnand# type: ignorecomments reduce readabilityCurrent Implementation
QUIC exceptions (Line 354):
exc_type: type[BaseException] | None | None- redundant| Noneexc_tb: Any- should beTracebackType | NoneMplex (Line 199):
return await self.write_to_stream(_bytes) # type: ignorewrite_to_streamreturnsNoneMplex logging (Lines 280, 304, 310):
logger.warning()callsAre you planning to do it yourself in a pull request ?
Yes