Skip to content

Make a set of rule like lint check and script code checks #121

Description

@sanjay-kv

✅ Task Overview
To maintain consistent code style and ensure high-quality contributions, we need to introduce a set of linting and code quality rules for the backend Python codebase. This includes adding tools for linting, formatting, and static analysis.

🧰 Tools to Include
flake8 – for linting and checking PEP8 compliance

black – for auto code formatting

isort – for sorting imports

pre-commit – to enforce rules locally before commit

GitHub Actions – to run linting and tests on PRs
Implementation Steps
Set up a .flake8 config file with rules (e.g., max line length, ignore rules)

Set up pyproject.toml for black and isort configuration

Add mypy.ini or pyproject.toml for type checking

Add pre-commit config with all hooks:

black

flake8

isort

Add a requirements-dev.txt or update pyproject.toml with dev dependencies

Create a GitHub Actions workflow .github/workflows/lint.yml to run on PRs:

Run black --check

Run flake8

Run isort --check-only

Run mypy

Update README with setup instructions for local development:

How to install pre-commit

How to run linters locally

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dev-envCI, pre-commit, pylint and other changes that do not change the behavior of the final code
    No fields configured for Feature.

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions