File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed
src/repl_python_wakatime/backends Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,7 @@ def __post_init__(
4747 self .headers = {
4848 "Content-Type" : "application/json" ,
4949 "User-Agent" : f"{ self .plugin } /{ __version__ } " ,
50- "X-API-Token" : keyring .get_password (
51- self .service_name , self .user_name
52- ),
50+ "X-API-Token" : keyring .get_password (self .service_name , self .user_name ),
5351 "Accept" : "*/*" ,
5452 }
5553 if not self .headers ["X-API-Token" ]:
@@ -83,17 +81,17 @@ def send_xp(self) -> None:
8381 if len (self .xp_dict ) == 0 :
8482 return
8583
86- xp_list = [
87- {"language" : ft , "xp" : xp } for ft , xp in self .xp_dict .items ()
88- ]
84+ xp_list = [{"language" : ft , "xp" : xp } for ft , xp in self .xp_dict .items ()]
8985 self .xp_dict = {self .language_type : 0 }
9086
9187 # after lock is released we can send the payload
9288 utc_now = datetime .now ().astimezone ().isoformat ()
93- data = json .dumps ({
94- "coded_at" : f"{ utc_now } " ,
95- "xps" : xp_list ,
96- }).encode ("utf-8" )
89+ data = json .dumps (
90+ {
91+ "coded_at" : f"{ utc_now } " ,
92+ "xps" : xp_list ,
93+ }
94+ ).encode ("utf-8" )
9795 req = Request (url = self .url , data = data , headers = self .headers )
9896 error = ""
9997 try :
Original file line number Diff line number Diff line change @@ -25,9 +25,7 @@ def __post_init__(self):
2525
2626 @staticmethod
2727 def get_wakatime_args (args : dict [str , str ]) -> list [str ]:
28- return ["wakatime-cli" , "--write" ] + [
29- f"--{ k } ={ v } " for k , v in args .items ()
30- ]
28+ return ["wakatime-cli" , "--write" ] + [f"--{ k } ={ v } " for k , v in args .items ()]
3129
3230 def __call__ (self ):
3331 """Send wakatime heartbeat."""
You can’t perform that action at this time.
0 commit comments