Skip to content

Commit 1ea9180

Browse files
committed
ci: fix ASYNC240 lint rule suppression
1 parent 710e280 commit 1ea9180

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

nxc/protocols/rdp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ async def screen(self):
589589
await asyncio.sleep(5)
590590
if self.conn is not None and self.conn.desktop_buffer_has_data is True:
591591
buffer = self.conn.get_desktop_buffer(VIDEO_FORMAT.PIL)
592-
filename = os.path.expanduser(f"{NXC_PATH}/screenshots/{self.hostname}_{self.host}_{datetime.now().strftime('%Y-%m-%d_%H%M%S')}.png") # noqa: ASYNC210
592+
filename = os.path.expanduser(f"{NXC_PATH}/screenshots/{self.hostname}_{self.host}_{datetime.now().strftime('%Y-%m-%d_%H%M%S')}.png")
593593
buffer.save(filename, "png")
594594
self.logger.highlight(f"Screenshot saved {filename}")
595595
except Exception as e:
@@ -617,7 +617,7 @@ async def nla_screen(self):
617617
await asyncio.sleep(int(self.args.screentime))
618618
if self.conn is not None and self.conn.desktop_buffer_has_data is True:
619619
buffer = self.conn.get_desktop_buffer(VIDEO_FORMAT.PIL)
620-
filename = os.path.expanduser(f"{NXC_PATH}/screenshots/{self.hostname}_{self.host}_{datetime.now().strftime('%Y-%m-%d_%H%M%S')}.png") # noqa: ASYNC210
620+
filename = os.path.expanduser(f"{NXC_PATH}/screenshots/{self.hostname}_{self.host}_{datetime.now().strftime('%Y-%m-%d_%H%M%S')}.png")
621621
buffer.save(filename, "png")
622622
self.logger.highlight(f"NLA Screenshot saved {filename}")
623623
return

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ ignore = [
113113
"A004", "E501", "F405", "D100", "D101", "D102", "D103", "D104", "D105", "D106",
114114
"D107", "D203", "D204", "D205", "D212", "D213", "D400", "D401", "D413", "D415",
115115
"D417", "D419", "FURB", "RET503", "RET505", "RET506", "RET507", "RET508",
116-
"PERF203", "RUF012", "RUF052", "RUF059"
116+
"PERF203", "RUF012", "RUF052", "RUF059", "ASYNC240"
117117
]
118118

119119
# THE SETTINGS BELOW ARE DEFAULTS, left in here to override potential vs-code settings

0 commit comments

Comments
 (0)