File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 6
6
import queue
7
7
import sys
8
8
import threading
9
- from typing import Optional
10
9
11
10
import requests
12
11
12
+ from specklepy .core .api .credentials import Account
13
+
13
14
"""
14
15
Anonymous telemetry to help us understand how to make a better Speckle.
15
16
This really helps us to deliver a better open source project and product!
@@ -54,16 +55,16 @@ def enable():
54
55
TRACK = True
55
56
56
57
57
- def set_host_app (host_app : str , host_app_version : Optional [ str ] = None ):
58
+ def set_host_app (host_app : str , host_app_version : str | None = None ):
58
59
global HOST_APP , HOST_APP_VERSION
59
60
HOST_APP = host_app
60
61
HOST_APP_VERSION = host_app_version or HOST_APP_VERSION
61
62
62
63
63
64
def track (
64
65
action : str ,
65
- account = None ,
66
- custom_props : Optional [ dict ] = None ,
66
+ account : Account | None = None ,
67
+ custom_props : dict | None = None ,
67
68
):
68
69
if not TRACK :
69
70
return
@@ -91,7 +92,7 @@ def track(
91
92
LOG .debug (f"Error queueing metrics request: { str (ex )} " )
92
93
93
94
94
- def initialise_tracker (account = None ):
95
+ def initialise_tracker (account : Account | None = None ):
95
96
global METRICS_TRACKER
96
97
if not METRICS_TRACKER :
97
98
METRICS_TRACKER = MetricsTracker ()
You can’t perform that action at this time.
0 commit comments