Skip to content

Fix #14: Enable trim_trailing_whitespace and clean up source code formatting - #20

Merged
kristiker merged 2 commits into
mainfrom
copilot/trim-trailing-whitespace-in-files
Sep 9, 2025
Merged

kristiker merged 2 commits into
mainfrom
copilot/trim-trailing-whitespace-in-files

Conversation

Copilot AI commented Sep 9, 2025 •

Copy link
Copy Markdown
Contributor

This PR addresses issue #14 by implementing the requested code formatting standardization, specifically focusing on trailing whitespace cleanup.

Changes Made

1. Updated .editorconfig

  • Uncommented and enabled trim_trailing_whitespace = true setting
  • This ensures future edits will automatically trim trailing whitespace

2. Cleaned up source code

  • Removed trailing whitespace from 6 Python source files in the keyvalues3/ directory:
    • keyvalues3/__init__.py
    • keyvalues3/binaryreader.py
    • keyvalues3/kv3file.py
    • keyvalues3/textreader.py
    • keyvalues3/utils/buffer.py
    • keyvalues3/utils/compression.py

3. Preserved test files

  • As requested, no modifications were made to any files in the tests/ directory
  • All existing functionality is preserved

Verification

  • ✅ All existing tests continue to pass (31 tests passed)
  • ✅ Module imports and basic functionality verified
  • ✅ Zero trailing whitespace remaining in source files
  • ✅ Changes are purely cosmetic (whitespace-only modifications)

The changes are minimal and surgical, affecting only trailing whitespace without altering any code logic or functionality. The diff shows 56 insertions and 57 deletions, resulting in a net reduction of 1 line due to whitespace cleanup.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: kristiker <26466974+kristiker@users.noreply.github.com>
@kristiker
kristiker marked this pull request as ready for review September 9, 2025 09:36
Copilot AI changed the title [WIP] Fix #14, mainly just trim trailing whitespace. Do not perform file modifications or linting on test files. Fix #14: Enable trim_trailing_whitespace and clean up source code formatting Sep 9, 2025
Copilot AI requested a review from kristiker September 9, 2025 09:36
@kristiker kristiker linked an issue Sep 9, 2025 that may be closed by this pull request
@kristiker
kristiker merged commit d5ccf26 into main Sep 9, 2025
2 checks passed
@kristiker
kristiker deleted the copilot/trim-trailing-whitespace-in-files branch September 9, 2025 09:37
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.

Fix and standardize code formatting

2 participants