Skip to content

Commit 4372a0a

Browse files
committed
🧑‍💻 Add args and kwargs to increase robustness
Fix missing __version__
1 parent 5f31bed commit 4372a0a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/repl_python_wakatime/hooks/codestats.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
from http.client import HTTPException
1414
from socket import gethostname
1515
from ssl import CertificateError
16-
from typing import NoReturn
16+
from typing import Any, NoReturn
1717
from urllib.error import URLError
1818
from urllib.request import Request, urlopen
1919

20+
from .. import __version__
21+
2022
logger = logging.getLogger(__name__)
2123
INTERVAL = 10 # interval at which stats are sent
2224
SLEEP_INTERVAL = 0.1 # sleep interval for timeslicing
@@ -31,6 +33,8 @@ def codestats_hook(
3133
language_type: str = "Terminal (python)",
3234
service_name: str = "codestats",
3335
user_name: str = gethostname(),
36+
*args: Any,
37+
**kwargs: Any,
3438
) -> None:
3539
"""Codestats hook.
3640

src/repl_python_wakatime/hooks/wakatime.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def send_wakatime_heartbeat(
1515
plugin: str = "repl-python-wakatime",
1616
filenames: list[str] = [".git"],
1717
detect_func: Callable[[str], bool] = os.path.isdir,
18+
*args: Any,
19+
**kwargs: Any,
1820
) -> None:
1921
"""Send wakatime heartbeat.
2022

0 commit comments

Comments
 (0)