File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
[build-system ]
2
- requires = [" setuptools >= 45 " , " setuptools_scm[toml] >= 6.2" , " setuptools-generate" ]
2
+ requires = [" setuptools_scm[toml] >= 6.2" , " setuptools-generate" ]
3
3
build-backend = " setuptools.build_meta"
4
4
5
5
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
Original file line number Diff line number Diff line change 13
13
14
14
def send_wakatime_heartbeat (
15
15
project : str = "" ,
16
+ category : str = "coding" ,
16
17
plugin : str = "repl-python-wakatime" ,
17
18
filenames : list [str ] = [".git" ],
18
19
detect_func : Callable [[str ], bool ] = os .path .isdir ,
@@ -26,6 +27,8 @@ def send_wakatime_heartbeat(
26
27
27
28
:param project:
28
29
:type project: str
30
+ :param category:
31
+ :type category: str
29
32
:param plugin:
30
33
:type plugin: str
31
34
:param filenames:
@@ -42,6 +45,7 @@ def send_wakatime_heartbeat(
42
45
[
43
46
"wakatime-cli" ,
44
47
"--write" ,
48
+ f"--category={ category } " ,
45
49
f"--plugin={ plugin } " ,
46
50
"--entity-type=app" ,
47
51
"--entity=python" ,
@@ -61,9 +65,6 @@ def wakatime_hook(*args: Any, **kwargs: Any) -> None:
61
65
:type kwargs: Any
62
66
:rtype: None
63
67
"""
64
- if which ("wakatime-cli" ) is None :
65
- logger .error ("Please install wakatime-cli firstly!" )
66
- return
67
68
task = Thread (target = send_wakatime_heartbeat , args = args , kwargs = kwargs )
68
69
task .daemon = True
69
70
task .start ()
You can’t perform that action at this time.
0 commit comments