[PR #2653] [CLOSED] Added docstrings to improve documentation in sort_blocks and in main function and also add another exception handeled. #15661

Closed
opened 2026-05-02 07:48:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vinta/awesome-python/pull/2653
Author: @audhee
Created: 2/16/2025
Status: Closed

Base: masterHead: add-docstrings


📝 Commits (1)

  • 2ef8d01 Added docstrings to improve documentation in sort_blocks and in main function and also handeled the exception in the main block

📊 Changes

1 file changed (+52 additions, -30 deletions)

View changed files

📝 sort.py (+52 -30)

📄 Description

…function and also handeled the exception in the main block

What is this Python project?

-> This python project automates "Readme File Organization " by sorting sections while keeping the headers intact.
-> It helps to maintain the consistency in the documentation and also it is very useful for large repositories.

Describe features.

What's the difference between this Python project and similar ones?

-> Unlike traditional README generators, this project does not create a README from scratch but rather sorts and organizes an existing one.
-> Many similar tools focus on generating documentation from code comments, whereas this script helps restructure and clean up an existing README.md.
-> This project maintains the hierarchical structure of headers and sections while ensuring that the entries under each section are sorted properly.
-> It automatically detects list entries (e.g., links in bullet points) and sorts them while preserving indentation.
-> The newly added exception handling makes it more robust compared to scripts that assume the README is always formatted correctly.

Enumerate comparisons.

What's the Difference Between This Python Project and Similar Ones?

| Feature | This Project | Similar Projects |
| README Organization | Sorts and restructures an existing README. | Many tools generate a new README from scratch. |
| Section Headers Handling | Preserves and maintains section headers. | Some tools may overwrite or remove headers. |
| Sorting Method | Sorts list entries within sections while keeping structure intact. | Often sorts the entire document without maintaining hierarchy. |
| Exception Handling | Includes error handling to prevent script failures. | Some scripts assume perfect input and may crash on errors. |
| Indentation Preservation | Maintains proper indentation while sorting. | Other tools may ignore formatting consistency. |

--

Anyone who agrees with this pull request could submit an Approve review to it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vinta/awesome-python/pull/2653 **Author:** [@audhee](https://github.com/audhee) **Created:** 2/16/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `add-docstrings` --- ### 📝 Commits (1) - [`2ef8d01`](https://github.com/vinta/awesome-python/commit/2ef8d01320388d7b19751dd6cd0672438cfe5cef) Added docstrings to improve documentation in sort_blocks and in main function and also handeled the exception in the main block ### 📊 Changes **1 file changed** (+52 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `sort.py` (+52 -30) </details> ### 📄 Description …function and also handeled the exception in the main block ## What is this Python project? -> This python project automates "Readme File Organization " by sorting sections while keeping the headers intact. -> It helps to maintain the consistency in the documentation and also it is very useful for large repositories. Describe features. ## What's the difference between this Python project and similar ones? -> Unlike traditional README generators, this project **does not create a README from scratch** but rather **sorts and organizes an existing one**. -> Many similar tools focus on **generating documentation** from code comments, whereas this script helps **restructure and clean up an existing README.md**. -> This project maintains the **hierarchical structure of headers and sections** while ensuring that the entries under each section are sorted properly. -> It **automatically detects list entries** (e.g., links in bullet points) and sorts them while preserving indentation. -> The newly added **exception handling** makes it more robust compared to scripts that assume the README is always formatted correctly. Enumerate comparisons. ## What's the Difference Between This Python Project and Similar Ones? | Feature | This Project | Similar Projects | | **README Organization** | Sorts and restructures an existing README. | Many tools generate a new README from scratch. | | **Section Headers Handling** | Preserves and maintains section headers. | Some tools may overwrite or remove headers. | | **Sorting Method** | Sorts list entries within sections while keeping structure intact. | Often sorts the entire document without maintaining hierarchy. | | **Exception Handling** | Includes error handling to prevent script failures. | Some scripts assume perfect input and may crash on errors. | | **Indentation Preservation** | Maintains proper indentation while sorting. | Other tools may ignore formatting consistency. | -- Anyone who agrees with this pull request could submit an *Approve* review to it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-02 07:48:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-python#15661