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.
- {dart-tools-0.3.8/dart_tools.egg-info → dart-tools-0.3.10}/PKG-INFO +1 -1
- {dart-tools-0.3.8 → dart-tools-0.3.10}/dart/dart.py +17 -3
- {dart-tools-0.3.8 → dart-tools-0.3.10/dart_tools.egg-info}/PKG-INFO +1 -1
- {dart-tools-0.3.8 → dart-tools-0.3.10}/pyproject.toml +1 -1
- {dart-tools-0.3.8 → dart-tools-0.3.10}/LICENSE +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/README.md +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/dart/__init__.py +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/dart/order_manager.py +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/dart_tools.egg-info/SOURCES.txt +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/dart_tools.egg-info/dependency_links.txt +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/dart_tools.egg-info/dist/dart-tools-0.3.3.tar.gz +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/dart_tools.egg-info/entry_points.txt +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/dart_tools.egg-info/requires.txt +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/dart_tools.egg-info/top_level.txt +0 -0
- {dart-tools-0.3.8 → dart-tools-0.3.10}/setup.cfg +0 -0
|
@@ -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.
|
|
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
|
|
344
|
+
f"Started work on\n\n {task['title']}\n {_get_task_url(config.host, task['duid'])}\n"
|
|
331
345
|
)
|
|
332
346
|
|
|
333
347
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|