From 6989302f48d5228017e386ba71a20ddc0c8cd437 Mon Sep 17 00:00:00 2001 From: Alexandre Menezes Date: Sun, 21 Jul 2024 12:06:45 -0300 Subject: [PATCH] code refactored --- .github/workflows/ci.yml | 2 +- .tool-versions | 2 +- Makefile | 3 ++- config/__init__.py | 2 +- config/core.py | 1 + config/spring.py | 1 + requirements-dev.txt | 1 - tests/unit/test_spring.py | 1 + 8 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c298020..437572c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: tests: strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '312'] os: [ubuntu] fail-fast: true runs-on: ${{ matrix.os }}-latest diff --git a/.tool-versions b/.tool-versions index 2ab8199..f1c0c50 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -python 3.11.2 +python 3.12.1 diff --git a/Makefile b/Makefile index f671652..b6dd4e4 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,8 @@ docs: install-deps: @echo "> installing dependencies..." - pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt + uv pip install -r requirements.txt pre-commit install tox: diff --git a/config/__init__.py b/config/__init__.py index 4490e9e..3e84e2f 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -3,7 +3,7 @@ from .cfenv import CFenv from .spring import ConfigClient, config_client, create_config_client -__version__ = "1.4.0" +__version__ = "1.5.0" __all__ = [ "__version__", "ConfigClient", diff --git a/config/core.py b/config/core.py index 3ffe7c5..13c479b 100644 --- a/config/core.py +++ b/config/core.py @@ -1,4 +1,5 @@ """Core functions.""" + from functools import wraps diff --git a/config/spring.py b/config/spring.py index 904a4fd..16af4f4 100644 --- a/config/spring.py +++ b/config/spring.py @@ -1,4 +1,5 @@ """Module for retrieve application's config from Spring Cloud Config.""" + import asyncio import os from functools import partial, wraps diff --git a/requirements-dev.txt b/requirements-dev.txt index e11672e..94a39b0 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,3 @@ --r requirements.txt flake8 pytest pytest-cov diff --git a/tests/unit/test_spring.py b/tests/unit/test_spring.py index 7a7254a..ccddbd2 100644 --- a/tests/unit/test_spring.py +++ b/tests/unit/test_spring.py @@ -1,4 +1,5 @@ """Test spring module.""" + from unittest.mock import PropertyMock import pytest