From 3ae650379c8e5f81696be1a13bf694af9a059868 Mon Sep 17 00:00:00 2001 From: Yayvan <105392699+batata-dev-in@users.noreply.github.com> Date: Sun, 23 Nov 2025 04:33:17 +0300 Subject: [PATCH] Update tox.ini optmized --- tox.ini | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index a5106a4..09ba92a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,49 @@ +# tox configuration for running tests and checks across multiple environments. [tox] -envlist = py36,py37,py38,py39 +# List of environments to run by default (using 'tox'). +# Includes modern Python versions (3.9+) and critical code quality checks. +envlist = py39, py310, py311, py312, lint, mypy +# ================================== +# Base Configuration for Testing +# ================================== [testenv] +description = Run tests for Python {basepython} +# Use the corresponding python version installed on the system +basepython = + py39: python3.9 + py310: python3.10 + py311: python3.11 + py312: python3.12 + +# Install dependencies from the test requirements file +deps = + -r requirements/requirements-test.txt + +# Commands to execute (running pytest with verbosity) +commands = + pytest -v + +# ================================== +# Code Quality Checks +# ================================== + +# Environment for running code style checks (e.g., Flake8) +[testenv:lint] +description = Check code style with Flake8 +skip_install = True +deps = + flake8 +commands = + flake8 {toxinidir} + +# Environment for running static type checks (e.g., Mypy) +[testenv:mypy] +description = Run static type checking with Mypy +skip_install = True deps = - -rrequirements/requirements-test.txt + mypy + # Install test dependencies for type checking context (optional but recommended) + -r requirements/requirements-test.txt commands = - pytest + mypy {toxinidir}