Skip to content

Commit

Permalink
fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Jan 10, 2024
1 parent 5fca271 commit 405afdc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ source = ["exceptiongroup"]
relative_files = true

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
exclude_also = [
"if TYPE_CHECKING:",
"@overload",
]
Expand All @@ -86,9 +85,8 @@ skip_missing_interpreters = true
minversion = 4.0
[testenv]
deps = coverage
extras = test
commands = coverage run -p -m pytest {posargs}
commands = python -m pytest {posargs}
usedevelop = true
[testenv:{py37-,py38-,py39-,py310-,py311-,py312-,}pyright]
Expand Down
7 changes: 5 additions & 2 deletions src/exceptiongroup/_suppress.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from contextlib import AbstractContextManager
from types import TracebackType
from typing import TYPE_CHECKING, Type
from typing import TYPE_CHECKING, Optional, Type

if sys.version_info < (3, 11):
from ._exceptions import BaseExceptionGroup
Expand All @@ -23,7 +23,10 @@ def __enter__(self) -> None:
pass

def __exit__(
self, exctype: Type[BaseException], excinst: BaseException, exctb: TracebackType
self,
exctype: Optional[Type[BaseException]],
excinst: Optional[BaseException],
exctb: Optional[TracebackType],
) -> bool:
# Unlike isinstance and issubclass, CPython exception handling
# currently only looks at the concrete type hierarchy (ignoring
Expand Down

0 comments on commit 405afdc

Please sign in to comment.