Updated version print command

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-12-02 23:11:33 +02:00
parent 5924211650
commit 22772a8e5a
2 changed files with 5 additions and 6 deletions

View file

@ -1,6 +1,7 @@
4.3.4 - 02/12/2022
Updated:
- Remove dataclasses and switch to __init__
- Version print command
Added:
- Version to the requires in the view packages command

View file

@ -2,20 +2,18 @@
# -*- coding: utf-8 -*-
from slpkg.configs import Configs
class Version:
''' Print the vesrsion. '''
def __init__(self):
self.prog_name: str = Configs.prog_name
self.version_info: tuple = (4, 3, 4)
self.version: str = '{0}.{1}.{2}'.format(*self.version_info)
self.license: str = 'MIT License'
self.author: str = 'dslackw'
self.author: str = 'Dimitris Zlatanidis (dslackw)'
self.homepage: str = 'https://dslackw.gitlab.io/slpkg'
def view(self):
print(f'{self.prog_name} version: {self.version}\n'
print(f'Version: {self.version}\n'
f'Author: {self.author}\n'
f'License: {self.license}\n'
f'Homepage: {self.homepage}')