Metadata-Version: 2.4
Name: flake8-final
Version: 0.0.4
Summary: flake8 plugin for check and inheritance of implementations
License: MIT
License-File: LICENSE
Author: Almaz Ilaletdinov
Author-email: a.ilaletdinov@yandex.ru
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: flake8 (>=7.1,<8.0)
Project-URL: Repository, https://github.com/blablatdinov/flake8-final
Description-Content-Type: text/markdown

<!---
SPDX-FileCopyrightText: Copyright (c) 2023-2026 Almaz Ilaletdinov <a.ilaletdinov@yandex.ru>
SPDX-License-Identifier: MIT
--->

# flake8-final

[![test](https://github.com/blablatdinov/flake8-final/actions/workflows/test.yml/badge.svg)](https://github.com/blablatdinov/flake8-final/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/blablatdinov/flake8-final/branch/master/graph/badge.svg)](https://codecov.io/gh/blablatdinov/flake8-final)
[![Python Version](https://img.shields.io/pypi/pyversions/flake8-final.svg)](https://pypi.org/project/flake8-final/)
[![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide)

## Background

Implementation inheritance can lead to brittle and hard-to-maintain code. By enforcing the use of the `@final` decorator, this plugin aims to encourage composition over inheritance, promoting better software design principles.

[yegor256 blog post](https://www.yegor256.com/2016/09/13/inheritance-is-procedural.html)

## Installation

To install `flake8-final`, you can use `pip`:

```bash
pip install flake8-final
```

## Usage

After installing the plugin, flake8 will automatically use it when you run the following command:

```bash
flake8 your_project_directory
```

The plugin will check each class definition to ensure it has a @final decorator. If a class is missing the @final decorator, an error will be reported.

## Example

Given the following Python code:

```python
class MyClass:
    pass
```

Running flake8 will produce the following error:

```
your_file.py:1:1: FIN100 class must be final
```

Adding the `@final` decorator will resolve the error:

```python
from typing import final


@final
class MyClass:
    pass
```

## License

[MIT](https://github.com/blablatdinov/flake8-final/blob/master/LICENSE)


## Credits

This project was generated with [`wemake-python-package`](https://github.com/wemake-services/wemake-python-package). Current template version is: [9899cb192f754a566da703614227e6d63227b933](https://github.com/wemake-services/wemake-python-package/tree/9899cb192f754a566da703614227e6d63227b933). See what is [updated](https://github.com/wemake-services/wemake-python-package/compare/9899cb192f754a566da703614227e6d63227b933...master) since then.

