Open
Conversation
Avasam
commented
Feb 8, 2025
Avasam
commented
Feb 8, 2025
Comment on lines
+158
to
+162
| # reversed makes cmgrs no longer variadic, breaking type validation | ||
| # Mypy infers compose_two as Callable[[function, function], function]. See: | ||
| # - https://github.com/python/typeshed/issues/7580 | ||
| # - https://github.com/python/mypy/issues/8240 | ||
| return functools.reduce(compose_two, reversed(cmgrs)) # type: ignore[return-value, arg-type] |
Contributor
Author
There was a problem hiding this comment.
Refs: python/typeshed#7580 & python/mypy#8240
Avasam
commented
Feb 8, 2025
| # Disable due to many false positives | ||
| overload-overlap, | ||
|
|
||
| # jaraco/backports.tarfile#1 |
Contributor
Author
There was a problem hiding this comment.
Avasam
commented
Feb 8, 2025
| [mypy-backports.*] | ||
| follow_untyped_imports = True | ||
|
|
||
| # jaraco/portend#17 |
2c189f1 to
3206ddc
Compare
Avasam
commented
Jun 3, 2025
Comment on lines
-303
to
312
|
|
||
| def __exit__(self, *exc_info): | ||
| type = exc_info[0] | ||
| matches = type and issubclass(type, self.exceptions) | ||
| def __exit__( | ||
| self, | ||
| *exc_info: Unpack[_UnpackableOptExcInfo], # noqa: PYI036 # We can do better than object | ||
| ) -> builtins.type[BaseException] | None | bool: | ||
| exc_type = exc_info[0] | ||
| matches = exc_type and issubclass(exc_type, self.exceptions) | ||
| if matches: | ||
| self.exc_info = exc_info | ||
| self.exc_info = exc_info # type: ignore[assignment] | ||
| return matches |
Contributor
Author
There was a problem hiding this comment.
Alternatively:
def __exit__(
self,
exc_type: builtins.type[BaseException] | None,
exc: BaseException | None,
exc_tb: TracebackType | None,
) -> builtins.type[BaseException] | None | bool:
matches = exc_type and issubclass(exc_type, self.exceptions)
if matches:
self.exc_info = (exc_type, exc, exc_tb) # type: ignore[assignment]
return matches
Avasam
commented
Jun 3, 2025
fa436ae to
208d1e5
Compare
Contributor
Author
|
Rebased to a single commit and I resolved comments that no longer apply |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15
Ref: jaraco/skeleton#143