Skip to content

Commit

Permalink
Allow for singluar abi file path in pypechain python call. Adjusting …
Browse files Browse the repository at this point in the history
…docstring
  • Loading branch information
Sheng Lundquist committed Dec 5, 2024
1 parent fab3819 commit 7652888
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pypechain/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def main(argv: Sequence[str] | None = None) -> None:


def pypechain(
abi_file_paths: list[str],
abi_file_paths: list[str] | str,
output_dir: str = "pypechain_types",
line_length: int = 120,
apply_formatting: bool = True,
Expand All @@ -39,15 +39,18 @@ def pypechain(
Parameters
----------
abi_file_path : str
Path to the abi JSON file.
abi_file_paths : list[str] | str
Path(s) to the abi JSON file.
output_dir: str, optional
Path to the directory where files will be generated. Defaults to 'pypechain_types'.
line_length : int, optional
Optional argument for the output file's maximum line length. Defaults to 120.
apply_formatting : bool, optional
If True, autoflake, isort and black will be applied to the file in that order, by default True.
"""
if isinstance(abi_file_paths, str):
abi_file_paths = [abi_file_paths]

# List to store all JSON ABI files to be processed
json_files_to_process: list[Path] = []

Expand Down

0 comments on commit 7652888

Please sign in to comment.