Skip to content

Commit

Permalink
fix: typing for kwargs
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck committed Oct 5, 2023
1 parent 84c6504 commit 83664c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cyclonedx/output/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import os
from abc import ABC, abstractmethod
from importlib import import_module
from typing import Any, Dict, Iterable, Optional, Type, Union
from typing import Any, Iterable, Optional, Type, Union

from ..model.bom import Bom
from ..model.component import Component
Expand Down Expand Up @@ -72,12 +72,12 @@ def generate(self, force_regeneration: bool = False) -> None:
@abstractmethod
def output_as_string(self, *,
indent: Optional[Union[int, str]] = None,
**kwargs: Dict[str, Any]) -> str:
**kwargs: Any) -> str:
...

def output_to_file(self, filename: str, allow_overwrite: bool = False, *,
indent: Optional[Union[int, str]] = None,
**kwargs: Dict[str, Any]) -> None:
**kwargs: Any) -> None:
# Check directory writable
output_filename = os.path.realpath(filename)
output_directory = os.path.dirname(output_filename)
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/output/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def generate(self, force_regeneration: bool = False) -> None:

def output_as_string(self, *,
indent: Optional[Union[int, str]] = None,
**kwargs: Dict[str, Any]) -> str:
**kwargs: Any) -> str:
self.generate()
return json_dumps(self._bom_json,
indent=indent)
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/output/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __make_indent(v: Optional[Union[int, str]]) -> str:

def output_as_string(self, *,
indent: Optional[Union[int, str]] = None,
**kwargs: Dict[str, Any]) -> str:
**kwargs: Any) -> str:
self.generate()
return self._bom_xml if indent is None else dom_parseString(self._bom_xml).toprettyxml(
indent=self.__make_indent(indent)
Expand Down

0 comments on commit 83664c0

Please sign in to comment.