Skip to content

Commit

Permalink
Fix: Runtime context methods to fix return type
Browse files Browse the repository at this point in the history
  • Loading branch information
n-thumann committed Nov 6, 2023
1 parent 22b11d5 commit 2385ff4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion pontos/nvd/cve_change_history/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from datetime import datetime
from typing import Any, AsyncIterator, Dict, Iterable, Optional, Union
from types import TracebackType
from typing import Any, AsyncIterator, Dict, Iterable, Optional, Type, Union

from httpx import Timeout

Expand Down Expand Up @@ -150,3 +151,17 @@ async def cve_changes(

if results_per_page is not None:
start_index += results_per_page

Check warning on line 153 in pontos/nvd/cve_change_history/api.py

View check run for this annotation

Codecov / codecov/patch

pontos/nvd/cve_change_history/api.py#L153

Added line #L153 was not covered by tests

async def __aenter__(self) -> "CVEChangeHistoryApi":
await super().__aenter__()
return self

Check warning on line 157 in pontos/nvd/cve_change_history/api.py

View check run for this annotation

Codecov / codecov/patch

pontos/nvd/cve_change_history/api.py#L156-L157

Added lines #L156 - L157 were not covered by tests

async def __aexit__(
self,
exc_type: Optional[Type[BaseException]],
exc_value: Optional[BaseException],
traceback: Optional[TracebackType],
) -> Optional[bool]:
return await super().__aexit__( # type: ignore

Check warning on line 165 in pontos/nvd/cve_change_history/api.py

View check run for this annotation

Codecov / codecov/patch

pontos/nvd/cve_change_history/api.py#L165

Added line #L165 was not covered by tests
exc_type, exc_value, traceback
)

0 comments on commit 2385ff4

Please sign in to comment.