mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-01 15:50:20 +02:00
Fix Pylint warnings.
This commit is contained in:
parent
890d554a84
commit
d812058ecb
4 changed files with 17 additions and 16 deletions
|
@ -18,15 +18,13 @@ class ArgumentParser(argparse.ArgumentParser):
|
|||
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
self.arguments: list[dict[str, Any]] = []
|
||||
super(ArgumentParser, self).__init__(*args, **kwargs)
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def add_argument(self, *args, **kwargs) -> None:
|
||||
"""Just store argument with options."""
|
||||
super(ArgumentParser, self).add_argument(*args, **kwargs)
|
||||
argument: dict[str, Any] = {"arguments": [x for x in args]}
|
||||
|
||||
for key in kwargs:
|
||||
argument[key] = kwargs[key]
|
||||
super().add_argument(*args, **kwargs)
|
||||
argument: dict[str, Any] = {"arguments": args}
|
||||
argument |= kwargs
|
||||
|
||||
self.arguments.append(argument)
|
||||
|
||||
|
@ -85,6 +83,8 @@ def completion_commands() -> str:
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
completions_path: Path = Path("~/.config/fish/completions/map-machine.fish")
|
||||
completions_path: Path = (
|
||||
Path.home() / ".config/fish/completions/map-machine.fish"
|
||||
)
|
||||
with completions_path.open("w+") as output_file:
|
||||
output_file.write(completion_commands())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue