Skip to content

[pre-commit.ci] pre-commit autoupdate (RDT-1320) #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ repos:
- --use-current-year
exclude: 'idf_build_apps/vendors/'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.11.10'
rev: 'v0.12.0'
hooks:
- id: ruff
args: ['--fix']
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.15.0'
rev: 'v1.16.1'
hooks:
- id: mypy
args: ['--warn-unused-ignores']
Expand Down
3 changes: 1 addition & 2 deletions idf_build_apps/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,7 @@ def main():
os.makedirs(os.path.dirname(os.path.realpath(arguments.output)), exist_ok=True)
with open(arguments.output, 'w') as fw:
if arguments.output_format == 'raw':
for app in apps:
fw.write(app.to_json() + '\n')
fw.writelines(app.to_json() + '\n' for app in apps)
elif arguments.output_format == 'json':
fw.write(json.dumps([app.model_dump() for app in apps], indent=2))
else:
Expand Down
3 changes: 1 addition & 2 deletions idf_build_apps/manifest/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ def dump_sha_values(self, sha_filepath: str) -> None:
:return: None
"""
with open(sha_filepath, 'w') as fw:
for rule in self.rules:
fw.write(f'{os.path.relpath(rule.folder, self._root_path)}:{rule.sha}\n')
fw.writelines(f'{os.path.relpath(rule.folder, self._root_path)}:{rule.sha}\n' for rule in self.rules)

def diff_sha_with_filepath(self, sha_filepath: str, use_abspath: bool = False) -> t.Set[str]:
"""
Expand Down
3 changes: 1 addition & 2 deletions idf_build_apps/session_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,5 @@ def _create_override_sdkconfig_merged_file(self, override_sdkconfig_merged_items
return None
f_path = os.path.join(self.workdir, 'override-result.sdkconfig')
with open(f_path, 'w+') as f:
for key, value in override_sdkconfig_merged_items.items():
f.write(f'{key}={value}\n')
f.writelines(f'{key}={value}\n' for key, value in override_sdkconfig_merged_items.items())
return f_path
Loading