Skip to content

Commit

Permalink
chore: refactor remove hex arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
robproject authored Oct 23, 2023
1 parent 08f696f commit 243f9ef
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions frappe_schema_json_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
@dataclass
class FrappeDiff:
old_path: str
old_hex: str
new_path: str
new_hex: str
print_table: int

def prep(self) -> None:
Expand Down Expand Up @@ -355,11 +353,11 @@ def print_custom(path: str) -> None:
table_mode = int(os.getenv('TABLE_MODE'))

try:
if sys.argv[2].split('.')[-1] == 'json' or sys.argv[5].split('.')[-1] == 'json':
if sys.argv[6] == '.':
console.log(f"[bold][red]Removed: {sys.argv[2].split('/')[-1]}[/red][/bold]")
if old_path.split('.')[-1] == 'json' or new_path.split('.')[-1] == 'json':
if new_hex == '.':
console.log(f"[bold][red]Removed: {old_path.split('/')[-1]}[/red][/bold]")
else:
diff = FrappeDiff(old_path, old_hex, new_path, new_hex, table_mode)
diff = FrappeDiff(old_path, new_path, table_mode)
diff.prep()
diff.print()
except Exception as e:
Expand Down

0 comments on commit 243f9ef

Please sign in to comment.