Skip to content

Commit

Permalink
change of version and name of variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Suspir0n committed May 2, 2021
1 parent 3bd8aab commit d80e5ef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tcenter for Python

A Python library for centralization of title. In this `0.1.4` version of tcenter, it allows you to center the title with a number of specific spaces.
A Python library for centralization of title. In this `0.1.3.1` version of tcenter, it allows you to center the title with a number of specific spaces.

## Installation

Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
setup(
name='tcenter',
packages=find_packages(include=['tcenter']),
version='0.1.4',
description='A library for center texts',
version='0.1.3.1',
description='A library for center titles',
author='Evandro Silva',
license='MIT',
install_requires=[],
Expand All @@ -14,10 +14,10 @@
tests_suite=['tests'],
author_email='evandrojunior1615@gmail.com',
url='https://github.com/Suspir0n/tcenter',
download_url='https://github.com/Suspir0n/tcenter/archive/refs/tags/0.1.3.tar.gz',
download_url='https://github.com/Suspir0n/tcenter/archive/refs/tags/0.1.3.1.tar.gz',
python_requires='>=3.6',
classifiers=[
'Development Status :: 0.1.4 - Production/Stable',
'Development Status :: 0.1.3.1 - Production/Stable',
'Environment :: Other Environment',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
Expand Down
10 changes: 5 additions & 5 deletions tcenter/center.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
def to_center(text, space, object=str()):
def to_center(title, space, object=str()):
"""
This function is reponsible for centralizing the text. accepted at least two vestments.
:param text: receive any text, only string.
This function is reponsible for centralizing the title. accepted at least two vestments.
:param title: receive any title, only string.
:param space: receive any value, only numbers.
:param object: receive any object, ex: - . = ~ < > _ | between others.
:return: The text centralized.
"""
try:
if object == '':
receive = f'{text:^{space}}'
receive = f'{title:^{space}}'
else:
receive = f'{text:{object}^{space}}'
receive = f'{title:{object}^{space}}'
except ValueError as err:
return f'information value invalid, {err}'
except TypeError as err:
Expand Down

0 comments on commit d80e5ef

Please sign in to comment.