style: drop redundant open mode arguments

This commit is contained in:
Mark Paronyan committed 2026-10-01 19:57:44 +03:00
1 parent d356a68987
commit 396407827e
4 files changed
+7 -7

No files matched your search

@@ -278,7 +278,7 @@ class SkillsLoader:
return ""
try:
with open(prompt_file, "r", encoding="utf-8") as f:
with open(prompt_file, encoding="utf-8") as f:
content = f.read()
logger.debug(f"Loaded prompt: {prompt_name} from {prompt_file}")
return content
@@ -302,7 +302,7 @@ class SkillsLoader:
try:
commands = []
with open(config_file, "r", encoding="utf-8") as f:
with open(config_file, encoding="utf-8") as f:
for line in f:
line = line.strip()
if not line or line.startswith("#"):
@@ -364,7 +364,7 @@ class SkillsLoader:
Returns:
Parsed YAML content as dictionary, or empty dict if file is empty
"""
with open(file_path, "r", encoding="utf-8") as f:
with open(file_path, encoding="utf-8") as f:
data = yaml.safe_load(f)
if not isinstance(data, dict):
logger.warning(f"YAML file {file_path} is empty or has invalid format")
+1 -1
View File
@@ -237,7 +237,7 @@ class VMware(BaseManager):
vmnet = f"vmnet{match.group(1)}"
if vmnet not in ("vmnet0", "vmnet1", "vmnet8"):
vmnet_interfaces[vmnet] = {}
with open(vmware_networking_file, "r", encoding="utf-8") as f:
with open(vmware_networking_file, encoding="utf-8") as f:
for line in f.read().splitlines():
match = re.search(r"VNET_([0-9]+)_HOSTONLY_SUBNET\s+(.*)", line)
if match:
+1 -1
View File
@@ -25,7 +25,7 @@ def _read_requirements(filename):
base_dir = _find_base_dir()
filepath = os.path.join(base_dir, filename)
packages = []
with open(filepath, "r") as f:
with open(filepath) as f:
for line in f:
line = line.strip()
if not line or line.startswith("#"):