-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): implement basic structure of "gas draft" command
PR Closed: #546
- Loading branch information
1 parent
ef116b6
commit aa218af
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Copyright 2021 Graviti. Licensed under MIT License. | ||
# | ||
|
||
"""Implementation of gas draft.""" | ||
|
||
import sys | ||
from typing import Dict | ||
|
||
import click | ||
|
||
from .tbrn import TBRN, TBRNType | ||
|
||
|
||
def _implement_draft( | ||
obj: Dict[str, str], tbrn: str, is_list: bool, title: str # pylint: disable=unused-argument | ||
) -> None: | ||
info = TBRN(tbrn=tbrn) | ||
|
||
if info.type != TBRNType.DATASET: | ||
click.echo(f'To operate a draft, "{info}" must be a dataset', err=True) | ||
sys.exit(1) | ||
|
||
if is_list: | ||
pass | ||
|
||
elif title: | ||
pass | ||
|
||
else: | ||
pass |