Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dougthor42/codesort
A Python source-code organization tool
https://github.com/dougthor42/codesort
Last synced: 6 days ago
JSON representation
A Python source-code organization tool
- Host: GitHub
- URL: https://github.com/dougthor42/codesort
- Owner: dougthor42
- License: mit
- Created: 2014-06-24T15:58:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-09T00:32:13.000Z (about 10 years ago)
- Last Synced: 2024-03-15T12:11:19.182Z (10 months ago)
- Language: Python
- Size: 495 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.txt
- License: LICENSE
Awesome Lists containing this project
README
#codesort
A Python source-code organization tool.The goal of this project is to create a tool that will take a python source code file (.py) and organize it to some standard by moving around class and function defintions, while still maintaining original functionality.
###The organization will be as follows:
>1. source file encoding (the "# -*- coding: utf-8 -*-" at the start of the file)
>2. module docstring
>3. \__future__ import statements
>4. import statements
>5. module constants
>6. classes
>7. module functions
>8. main() function
>9. toplevel module code
>10. if \__name__ == '\__main__' block###Classes are to be organized in the following way:
>0. class docstring
>1. \__init__
>2. \__new__
>3. \__del__
>4. \__str__
>5. \__repr__
>6. \__cmp__
>7. \__hash__
>8. \__nonzero__
>9. \__unicode__
>10. \__getattr__
>11. \__setattr__
>12. \__delattr__
>13. \__getattribute__
>14. \__get__
>15. \__set__
>16. \__delete__
>17. \
>18. \Private and private methods are organized alphabetically.
Module functions are organized alphabetically, except for the main() function, which is always at the end of the module functions