tinybird 0.0.1.dev215__py3-none-any.whl → 0.0.1.dev216__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tinybird might be problematic. Click here for more details.

tinybird/tb/__cli__.py CHANGED
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
4
4
  __url__ = 'https://www.tinybird.co/docs/forward/commands'
5
5
  __author__ = 'Tinybird'
6
6
  __author_email__ = 'support@tinybird.co'
7
- __version__ = '0.0.1.dev215'
8
- __revision__ = 'cdd01a6'
7
+ __version__ = '0.0.1.dev216'
8
+ __revision__ = 'b1646cc'
@@ -318,41 +318,21 @@ line experience. To opt-out, set TB_CLI_TELEMETRY_OPTOUT to '1' or 'true'."""
318
318
 
319
319
  # Only suggest if the similarity score is high enough (adjust threshold as needed)
320
320
  if score >= 65:
321
- # Initialize lists for arguments before and after command
322
- args_before_cmd: List[str] = []
323
- args_after_cmd: List[str] = []
324
-
325
- # Reconstruct the full command with all arguments
326
- full_command = ctx.command_path # Gets the base command (e.g., 'tb')
327
-
328
- # Add any options/arguments that came before the command
329
- if ctx.args:
330
- found_cmd = False
331
- for arg in ctx.args:
332
- if arg == cmd_name:
333
- found_cmd = True
334
- elif found_cmd:
335
- args_after_cmd.append(arg)
336
- else:
337
- args_before_cmd.append(arg)
338
-
339
- if args_before_cmd:
340
- full_command += " " + " ".join(args_before_cmd)
341
-
342
- # Add any options from params
343
- if ctx.params:
344
- for param, value in ctx.params.items():
345
- if value is True:
346
- full_command += f" --{param}"
347
- elif value is not False and value is not None:
348
- full_command += f" --{param} {value}"
349
-
350
- # Add the suggested command
351
- full_command += f" {suggestion}"
352
-
353
- # Add any arguments that came after the command
354
- if args_after_cmd:
355
- full_command += " " + " ".join(args_after_cmd)
321
+ # Build the suggested command from the raw arguments,
322
+ # preserving only those explicitly passed by the user.
323
+ raw_args = sys.argv[1:]
324
+ try:
325
+ idx = raw_args.index(cmd_name)
326
+ except ValueError:
327
+ # If the mistyped command isn't found, use all as 'after'.
328
+ before = []
329
+ after = raw_args
330
+ else:
331
+ before = raw_args[:idx]
332
+ after = raw_args[idx + 1 :]
333
+
334
+ full_tokens = [ctx.command_path, *before, suggestion, *after]
335
+ full_command = " ".join(full_tokens)
356
336
 
357
337
  click.echo(f"\nWARNING: '{cmd_name}' is not a valid command. ", nl=False)
358
338
  # Ask for confirmation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev215
3
+ Version: 0.0.1.dev216
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -17,7 +17,7 @@ tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1w
17
17
  tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
18
18
  tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
19
19
  tinybird/datafile/parse_pipe.py,sha256=xf4m0Tw44QWJzHzAm7Z7FwUoUUtr7noMYjU1NiWnX0k,3880
20
- tinybird/tb/__cli__.py,sha256=7SUurDL5cvd_jq8kgVKbNv0nYu14klnwH04iy8Jzih0,247
20
+ tinybird/tb/__cli__.py,sha256=mA8tARgcpYXiyhPqdbnpYFDjf_bvSisl_rENpsTa58Y,247
21
21
  tinybird/tb/check_pypi.py,sha256=i3l2L8IajeB7sreikR7oPlYJki9MtS3c_M4crnmbByc,760
22
22
  tinybird/tb/cli.py,sha256=0xYk2Ip4vb3nNFbxfTdG3VoIgdRvUKVbUVU_mviErPA,1107
23
23
  tinybird/tb/client.py,sha256=FKj61vY9STPW03kfVcxYuY1_csI-kP-mc1ERQfqJtg8,56505
@@ -25,7 +25,7 @@ tinybird/tb/config.py,sha256=jT9xndpeCY_g0HdB5qE2EquC0TFRRnkPnQFWZWd04jo,3998
25
25
  tinybird/tb/modules/build.py,sha256=T36msoBK5g9AZlrJnFRPvlZbrdE265LY1q3Y4YqvS3w,20067
26
26
  tinybird/tb/modules/cicd.py,sha256=Njb6eZOHHbUkoJJx6KoixO9PsfA_T-3Ybkya9-50Ca8,7328
27
27
  tinybird/tb/modules/cli.py,sha256=k6Bp-lWC-ruMMB47lxwsinLQt4qJL_n84hjyxi9JYt4,15676
28
- tinybird/tb/modules/common.py,sha256=nzAF52gkDPx1_LKg3l-j1Ko9Y1o_Wq9dYxxhu47bAeg,84221
28
+ tinybird/tb/modules/common.py,sha256=WWvbDSQmyYUy9Xyc_BqtrdRzpDdzLuE9i_pWhoA1a8k,83440
29
29
  tinybird/tb/modules/config.py,sha256=VnzYVUo4q1RBEEMMce4_OCrKp4erhgkRPHElydVlKj0,11488
30
30
  tinybird/tb/modules/connection.py,sha256=rdEsdcP-AqyHiW3KNoETGPeTjk7Wt3It6z_SnmInGcc,18648
31
31
  tinybird/tb/modules/copy.py,sha256=zHN1d5NA-MFsgbk2kKJq2P9qA8dNOnIsIa60QpVnSwc,4458
@@ -82,8 +82,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
82
82
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
83
83
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
84
84
  tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
85
- tinybird-0.0.1.dev215.dist-info/METADATA,sha256=zGTBhqtryJztGGmmcNeOBfOqUV49VhZQgyA3RxGnmog,1682
86
- tinybird-0.0.1.dev215.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
87
- tinybird-0.0.1.dev215.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
88
- tinybird-0.0.1.dev215.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
89
- tinybird-0.0.1.dev215.dist-info/RECORD,,
85
+ tinybird-0.0.1.dev216.dist-info/METADATA,sha256=OFw1ggbnDCkrP-xifq_bE75sbm4GxpPP5CEK0KjDAG0,1682
86
+ tinybird-0.0.1.dev216.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
87
+ tinybird-0.0.1.dev216.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
88
+ tinybird-0.0.1.dev216.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
89
+ tinybird-0.0.1.dev216.dist-info/RECORD,,