Skip to main content

Sorts class methods according to the step-down rule

Project description

sdsort

Sorts methods within python classes according to the step-down rule, as described in Robert C. Martin's Clean Code. More concretely, methods are ordered in a depth-first-traversal order of the dependency tree.

Installation

pip install sdsort

Usage

To target individual files, run the sdsort command, followed by the paths to the files that should be sorted:

sdsort <file_1> <file_2>

To sort all *.py files in a directory, and all of its subdirectories, run the sdsort command followed by the directory path:

sdsort <directory_path>

Maturity

It's early days. Consider this an alpha for now.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdsort-0.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sdsort-0.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file sdsort-0.1.1.tar.gz.

File metadata

  • Download URL: sdsort-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.7.10 Linux/5.4.72-microsoft-standard-WSL2

File hashes

Hashes for sdsort-0.1.1.tar.gz
Algorithm Hash digest
SHA256 db6ab500213bb8edee41332a84e3c2373c2b54cd8eb4933524d4718fe6960535
MD5 8649d1254d807b2744c3717bd4672056
BLAKE2b-256 a31dda2e358487e5c92122db723aad741b59cce1b1015058865ad18dab0b59a9

See more details on using hashes here.

File details

Details for the file sdsort-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sdsort-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.7.10 Linux/5.4.72-microsoft-standard-WSL2

File hashes

Hashes for sdsort-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ccbdee4387017bc2716c1969d294dbb4083082eb2ec176dbfb25ea572fdde6d
MD5 3313b9d7797cec5fc445f29bdce78065
BLAKE2b-256 c116fe92ddb89645f8467ed31cdf04914674ed994efd057d260fe91a9d454d1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page