Skip to content

Conversation

@spoorcc
Copy link
Contributor

@spoorcc spoorcc commented Jan 3, 2026

Fixes #327

Summary by CodeRabbit

  • Bug Fixes
    • Manifest files now use native operating system line breaks when written, ensuring consistent formatting across different platforms.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 3, 2026

Walkthrough

The changes modify how dfetch dumps manifest files by explicitly specifying native OS line separators via os.linesep in the YAML dump operation. Additionally, typing-ignore comments are updated for the write_line_break method calls. A changelog entry documents this fix for issue #327.

Changes

Cohort / File(s) Summary
Documentation Update
CHANGELOG.rst
Added changelog entry for issue #327 noting that dfetch freeze and dfetch import now use native line breaks.
Manifest Dump Configuration
dfetch/manifest/manifest.py
Modified dump() function to include line_break=os.linesep parameter in yaml.dump() call, ensuring platform-specific line endings. Updated typing-ignore comments on three write_line_break related calls to include no-untyped-call directive.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: using native line breaks in dfetch import and dfetch freeze manifests, directly matching the PR's primary objective.
Linked Issues check ✅ Passed The code changes implement the requirement from issue #327: yaml.dump now includes line_break=os.linesep to produce platform-native line endings in manifests.
Out of Scope Changes check ✅ Passed All changes are in-scope: the manifest.py modification adds native line breaks as required, and CHANGELOG.rst documents the fix, with no extraneous modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@spoorcc spoorcc marked this pull request as ready for review January 3, 2026 20:41
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
dfetch/manifest/manifest.py (1)

331-336: Implementation correctly addresses issue #327.

The addition of line_break=os.linesep is supported in PyYAML 6.0.3 and will produce platform-native line endings as intended.

However, be aware that this can cause version control conflicts if manifests are created on different platforms and committed without proper .gitattributes configuration. Consider documenting that users should add *.yaml text eol=lf to their .gitattributes file to normalize line endings in git, or accept that manifests may show as changed when switching platforms.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e0926fd and ab38e1d.

📒 Files selected for processing (2)
  • CHANGELOG.rst
  • dfetch/manifest/manifest.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build / build (windows-latest)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (2)
dfetch/manifest/manifest.py (1)

419-425: Type annotation maintenance updates look good.

The addition of no-untyped-call to the ignore comments is appropriate for untyped library methods.

CHANGELOG.rst (1)

29-29: Changelog entry is accurate; PR objectives contain outdated information.

The changelog correctly lists only dfetch freeze and dfetch import. The dfetch init command does not call Manifest.dump()—it simply copies a template file using shutil.copyfile(). The PR objectives mentioning dfetch init appear to be incorrect or outdated and should be disregarded.

@spoorcc spoorcc merged commit 2fd03dd into main Jan 3, 2026
42 checks passed
@spoorcc spoorcc deleted the spoorcc/issue327 branch January 3, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-native line breaks in dfetch init and dfetch freeze manifests

2 participants