diff --git a/scale_data/__init__.py b/scale_data/__init__.py new file mode 100644 index 0000000..cbe1160 --- /dev/null +++ b/scale_data/__init__.py @@ -0,0 +1,5 @@ +from .scale_data import ScaleData, ScaleDataFromStr + +__all__ = [ + 'ScaleData', 'ScaleDataFromStr' +] \ No newline at end of file diff --git a/scale_data.py b/scale_data/scale_data.py similarity index 64% rename from scale_data.py rename to scale_data/scale_data.py index 5eee203..7cfb7db 100644 --- a/scale_data.py +++ b/scale_data/scale_data.py @@ -1,19 +1,19 @@ class ScaleData: - def __init__(self, replica_count: int): + def __init__(self, replica_coefficient: float): ''' Инициализация класса ''' - self.replica_count = replica_count + self.replica_coefficient: float = replica_coefficient def __str__(self) -> str: ''' Превращает скейл дату в строку ''' - return str(self.replica_count) + return str(self.replica_coefficient) class ScaleDataFromStr(ScaleData): def __init__(self, string_data: str): ''' Инициализация класса из строки ''' - return super().__init__(int(string_data)) + return super().__init__(float(string_data)) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..48ab0f5 --- /dev/null +++ b/setup.py @@ -0,0 +1,17 @@ +from setuptools import setup, find_packages + +setup( + name='scale_data', + version='0.1.0', + packages=find_packages(), + install_requires=[], + author='BobryTeam', + author_email='sinntexxx@gmail.com', + description='ScaleData data structure', + url='https://github.com/BobryTeam/scale-data', + classifiers=[ + 'Programming Language :: Python :: 3', + 'Operating System :: OS Independent', + ], + python_requires='>=3.10', +)