Metadata-Version: 2.4
Name: cutykt
Version: 0.1.1
Summary: A Cuty-Series Custom Kotlin Formatter
Author: AttAditya
License: MIT License
        
        Copyright (c) 2026 AttAditya
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://gitlab.com/cutycode/cutykt
Project-URL: Repository, https://gitlab.com/cutycode/cutykt
Keywords: kotlin,formatter,code-formatter,lint,formatting
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langex
Dynamic: license-file

<div align="center">

<img src="https://gitlab.com/cutycode/cutykt/-/raw/main/logo.png" width="100px">

# [CutyKt](https://pypi.org/project/cutykt/)

</div>

## About

A Cuty-Series Custom Kotlin Formatter

## Installation

`pip install cutykt`

## Usage

Format a file or directory:

`cutykt path/to/file_or_directory`

Check if files need formatting (useful for CI or pre-commit):

`cutykt --check path/to/project`

If formatting changes are required in check mode, formatter exits with a non-zero status code.

## About

The tool is a minimal and fast Python formatter designed to enforce consistent formatting rules across Python codebases.

Unlike large formatters that heavily restructure code, CutyKt focuses on deterministic formatting rules applied through a small rule engine. Each rule handles a specific formatting concern such as indentation, spacing, blank lines, or import ordering.

The formatter processes files using modular formatting rules, making the system easier to reason about, extend, and control.

## Features

- Deterministic Python formatting
- Rule-based formatting system
- Import sorting
- Consistent indentation enforcement
- Blank line normalization
- Trailing space cleanup
- Line ending normalization
- Automatic EOF newline insertion
- Optional check mode for CI pipelines

## Project Structure

```tree
cutykt
├── __init__.py
├── __main__.py
├── checker
│   ├── __init__.py
│   └── check_line_length.py
├── cli
│   ├── __init__.py
│   ├── args_handler.py
│   └── version.py
├── common
│   ├── __init__.py
│   ├── compact.py
│   ├── expand.py
│   └── reset.py
├── core
│   ├── __init__.py
│   └── main.py
├── engine
│   ├── __init__.py
│   ├── discovery.py
│   ├── pipelines
│   │   ├── __init__.py
│   │   ├── check.py
│   │   └── solve.py
│   └── worker.py
├── models
│   ├── __init__.py
│   ├── args.py
│   └── content.py
└── solver
    ├── __init__.py
    ├── add_eof_double_blanks.py
    ├── add_keyword_blanks.py
    ├── fix_double_blanks.py
    ├── fix_import_order.py
    ├── fix_indentation.py
    ├── fix_line_ends.py
    └── remove_blanks.py
```

## Design Philosophy

The formatter is built around a few core ideas:

- Minimal implementation
- Explicit formatting rules
- Predictable output
- Easy extensibility
- Suitable for automation (CI / pre-commit)

Rather than trying to cover every stylistic decision, the formatter focuses on enforcing a small set of reliable formatting guarantees.

## Links

- [PyPI](https://pypi.org/project/cutykt/)
- [GitHub](https://gitlab.com/cutycode/cutykt)

> Made with <3 by [AttAditya](https://attaditya.space/)

