From c39269a1db8cf67cd50ab3b9dd10255315ea410c Mon Sep 17 00:00:00 2001 From: Rud356 Date: Sat, 24 Jul 2021 19:58:57 +0300 Subject: [PATCH] Fix README.md Bump version to 2.2.0 --- ConfigFramework/__init__.py | 2 +- README.md | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ConfigFramework/__init__.py b/ConfigFramework/__init__.py index 7b320eb..ea94998 100644 --- a/ConfigFramework/__init__.py +++ b/ConfigFramework/__init__.py @@ -3,4 +3,4 @@ from .base_config import BaseConfig # noqa: package exported variables from .dump_caster import DumpCaster # noqa: package exported variables -__version__ = "2.1.1" +__version__ = "2.2.0" diff --git a/README.md b/README.md index c94aa96..646d00b 100644 --- a/README.md +++ b/README.md @@ -70,20 +70,23 @@ See examples with explanation [here](https://github.com/Rud356/ConfigFramework/b ```python3 from ConfigFramework import BaseConfig from ConfigFramework.loaders import DictLoader -from ConfigFramework.variables import ConfigVar +from ConfigFramework.variables import ConfigVar, IntVar from ConfigFramework.custom_types import VariableType loader = DictLoader.load({"a": 1, "b": 2.22}) class Config(BaseConfig): - a: VariableType[int] = ConfigVar("a", loader) - b: VariableType[float] = ConfigVar("b", loader) + # Following method of type hinting is deprecated and will be deleted in 2.5.0 + a: VariableType[int] = IntVar("a", loader) + # Since 2.2.0 it's recommended to use ConfigVar to type hint things + b: ConfigVar[float] = ConfigVar("b", loader) conf = Config() # You will get float functions suggestions from IDE if you use it like that! conf.b.value.as_integer_ratio() + ``` ## Supported formats