dart-tools 0.3.8__tar.gz → 0.3.10__tar.gz

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 dart-tools might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dart-tools
3
- Version: 0.3.8
3
+ Version: 0.3.10
4
4
  Summary: The Dart CLI and Python Library
5
5
  Author-email: Dart Software Team <software@itsdart.com>
6
6
  License: MIT License
@@ -4,6 +4,7 @@
4
4
  """A CLI to interact with the Dart web app."""
5
5
 
6
6
  import argparse
7
+ from functools import wraps
7
8
  import json
8
9
  import os
9
10
  import random
@@ -90,6 +91,17 @@ def _get_task_url(host, duid):
90
91
  return f"{host}/search?t={duid}"
91
92
 
92
93
 
94
+ def suppress_exception(fn):
95
+ @wraps(fn)
96
+ def wrapper(*args, **kwargs):
97
+ try:
98
+ return fn(*args, **kwargs)
99
+ except Exception: # pylint: disable=broad-except
100
+ return None
101
+
102
+ return wrapper
103
+
104
+
93
105
  def _exit_gracefully(_signal_received, _frame) -> None:
94
106
  sys.exit("Quitting.")
95
107
 
@@ -269,10 +281,12 @@ def print_version():
269
281
  print(f"dart-tools version {_VERSION}")
270
282
 
271
283
 
284
+ @suppress_exception
272
285
  def print_version_update_message_maybe():
273
286
  latest = (
274
- _run_cmd("pip index versions dart-tools 2>&1")
287
+ _run_cmd("pip --disable-pip-version-check index versions dart-tools 2>&1")
275
288
  .rsplit("LATEST:", maxsplit=1)[-1]
289
+ .split("\n", maxsplit=1)[0]
276
290
  .strip()
277
291
  )
278
292
  if latest == _VERSION or [int(e) for e in latest.split(".")] <= [
@@ -281,7 +295,7 @@ def print_version_update_message_maybe():
281
295
  return
282
296
 
283
297
  print(
284
- f"A new version of dart-tools is available. To upgrade from {_VERSION} to {latest}, run\n\n\tpip install --upgrade dart-tools\n"
298
+ f"A new version of dart-tools is available. Upgrade from {_VERSION} to {latest} with\n\n pip install --upgrade dart-tools\n"
285
299
  )
286
300
 
287
301
 
@@ -327,7 +341,7 @@ def _begin_task(config, session, user_email, get_task):
327
341
  _Git.checkout_branch(branch_name)
328
342
 
329
343
  print(
330
- f"Started work on {task['title']} at {_get_task_url(config.host, task['duid'])} on branch {branch_name}"
344
+ f"Started work on\n\n {task['title']}\n {_get_task_url(config.host, task['duid'])}\n"
331
345
  )
332
346
 
333
347
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dart-tools
3
- Version: 0.3.8
3
+ Version: 0.3.10
4
4
  Summary: The Dart CLI and Python Library
5
5
  Author-email: Dart Software Team <software@itsdart.com>
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dart-tools"
3
- version = "0.3.8"
3
+ version = "0.3.10"
4
4
  description = "The Dart CLI and Python Library"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.8"
File without changes
File without changes
File without changes
File without changes