Skip to main content

Simple Python code analysis and formatting library.

Project description

CodeHealthKit

A simple Python library for analyzing and formatting Python code.

Installation

pip install codehealthkit

Usage

Analyzer

from codehealthkit.analyzer import count_lines
print(count_lines("sample.py"))

Formatter

from codehealthkit.formatter import snake_to_camel
print(snake_to_camel("student_name"))

Functions

analyzer.py

  • count_lines(file_path) - Count total lines in a file
  • find_todos(file_path) - Find TODO comments
  • find_missing_docstrings(file_path) - Detect functions without docstrings
  • find_duplicate_lines(file_path) - Detect duplicate lines

formatter.py

  • snake_to_camel(text) - Convert snake_case to camelCase
  • camel_to_snake(text) - Convert camelCase to snake_case
  • remove_trailing_whitespace(file_path) - Remove trailing spaces
  • find_long_lines(file_path, limit=79) - Find lines over the limit

License

MIT

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

codehealthkit-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

codehealthkit-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file codehealthkit-0.1.0.tar.gz.

File metadata

  • Download URL: codehealthkit-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for codehealthkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3063a3e0e4fc85c9841a42448c0e763a2bac498d927f5ae97173e4337c1d3797
MD5 12754b94af32fb81c194cec71b100ef5
BLAKE2b-256 ed10353997358df4cb032907c307a3f82ac38d5c549660909fdee1481da74e95

See more details on using hashes here.

File details

Details for the file codehealthkit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: codehealthkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for codehealthkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a1ef39510e7b432eb4f0635930391aa6570b49b05d6ea6f56f983ff1fbede3f
MD5 e06920461deac28bf7ee5a0e5cac7ab3
BLAKE2b-256 d51d9af88712f85b4395e85a0d2a72d0ac93b0dd2112db47d370534ba98f8c68

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