File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[build-system ]
2- requires = [" setuptools >= 45 " , " setuptools_scm[toml] >= 6.2" , " setuptools-generate" ]
2+ requires = [" setuptools_scm[toml] >= 6.2" , " setuptools-generate" ]
33build-backend = " setuptools.build_meta"
44
55# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
Original file line number Diff line number Diff line change 1313
1414def send_wakatime_heartbeat (
1515 project : str = "" ,
16+ category : str = "coding" ,
1617 plugin : str = "repl-python-wakatime" ,
1718 filenames : list [str ] = [".git" ],
1819 detect_func : Callable [[str ], bool ] = os .path .isdir ,
@@ -26,6 +27,8 @@ def send_wakatime_heartbeat(
2627
2728 :param project:
2829 :type project: str
30+ :param category:
31+ :type category: str
2932 :param plugin:
3033 :type plugin: str
3134 :param filenames:
@@ -42,6 +45,7 @@ def send_wakatime_heartbeat(
4245 [
4346 "wakatime-cli" ,
4447 "--write" ,
48+ f"--category={ category } " ,
4549 f"--plugin={ plugin } " ,
4650 "--entity-type=app" ,
4751 "--entity=python" ,
@@ -61,9 +65,6 @@ def wakatime_hook(*args: Any, **kwargs: Any) -> None:
6165 :type kwargs: Any
6266 :rtype: None
6367 """
64- if which ("wakatime-cli" ) is None :
65- logger .error ("Please install wakatime-cli firstly!" )
66- return
6768 task = Thread (target = send_wakatime_heartbeat , args = args , kwargs = kwargs )
6869 task .daemon = True
6970 task .start ()
You can’t perform that action at this time.
0 commit comments