Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 720ef79

Browse files
author
DirectiveAthena
committed
Change: Final Cleanup
1 parent 544c503 commit 720ef79

File tree

6 files changed

+8
-23
lines changed

6 files changed

+8
-23
lines changed

Tests/Functions/test_General.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@
1515
# - Code -
1616
# ----------------------------------------------------------------------------------------------------------------------
1717
class Functions_General(unittest.TestCase):
18-
def test_Normalize(self):
19-
for i in range(1,100):
20-
with self.subTest(i=i):
21-
self.assertEqual(Normalize(i), i/100)
22-
23-
def test_Normalize_Factor(self):
24-
for i, f in zip(range(1,100),range(100,200)):
25-
with self.subTest(i=i):
26-
self.assertEqual(Normalize(i, factor=f), i/f)
27-
2818
def test_RoundToDecimals(self):
2919
for i, f in zip(range(1,24),range(24,56)):
3020
with self.subTest(i=i, f=f):

Tests/SpeedTest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def ObjectCreation():
5252
if __name__ == '__main__':
5353
print(f"Conversion:{ForeNest.Red(timeit.repeat(lambda: Conversion(), number=1_000_000, repeat=5))}")
5454
print(f"ConversionInline:{ForeNest.Red(timeit.repeat(lambda: ConversionInline(), number=1_000_000, repeat=5))}")
55-
# print(f"TextInline:{ForeNest.Red(timeit.repeat(lambda: TextInline(), number=1_000_000, repeat=5))}")
56-
# print(f"TextNested:{ForeNest.Red(timeit.repeat(lambda: TextNested(), number=1_000_000, repeat=5))}")
57-
# print(f"TextNestedBig:{ForeNest.Red(timeit.repeat(lambda: TextNestedBig(), number=1_000_000, repeat=5))}")
58-
# print(f"ObjectCreation:{ForeNest.Red(timeit.repeat(lambda: ObjectCreation(), number=1_000_000, repeat=5))}")
55+
print(f"TextInline:{ForeNest.Red(timeit.repeat(lambda: TextInline(), number=1_000_000, repeat=5))}")
56+
print(f"TextNested:{ForeNest.Red(timeit.repeat(lambda: TextNested(), number=1_000_000, repeat=5))}")
57+
print(f"TextNestedBig:{ForeNest.Red(timeit.repeat(lambda: TextNestedBig(), number=1_000_000, repeat=5))}")
58+
print(f"ObjectCreation:{ForeNest.Red(timeit.repeat(lambda: ObjectCreation(), number=1_000_000, repeat=5))}")
5959

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
setuptools.setup(
1616
name="AthenaColor",
17-
version="4.0.1",
17+
version="4.1.0",
1818
author="Andreas Sas",
1919
author_email="",
2020
description="Package to support full usage of RGB colors in the Console.",

src/AthenaColor/Functions/ANSIsquences.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
# ----------------------------------------------------------------------------------------------------------------------
2020
# - Code -
2121
# ----------------------------------------------------------------------------------------------------------------------
22-
23-
2422
def ColorSequence(control_code:int|str)->str:
2523
"""
2624
Used for quick assembly of correct Ansi Escape functions

src/AthenaColor/Functions/General.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@
1313
# - All -
1414
# ----------------------------------------------------------------------------------------------------------------------
1515
__all__ = [
16-
"Normalize", "RoundHalfUp","RoundToDecimals"
16+
"RoundHalfUp","RoundToDecimals"
1717
]
1818

1919
# ----------------------------------------------------------------------------------------------------------------------
2020
# - Code -
2121
# ----------------------------------------------------------------------------------------------------------------------
22-
def Normalize(value:int|float, factor:int|float=100)->float:
23-
return value/factor
24-
2522
def RoundToDecimals(value:int|float, decimals:int=init.decimalPlaces):
2623
return round(value, decimals)
2724

src/AthenaColor/Objects/Color/ColorTupleConversion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# Custom Packages
1212
from AthenaColor.Functions.General import (
13-
Normalize,RoundHalfUp,RoundToDecimals
13+
RoundHalfUp,RoundToDecimals
1414
)
1515
from AthenaColor.Functions.Constraints import (
1616
ConstrainHSV, ConstrainHSL, ConstrainRGB, ConstrainCMYK,ConstrainRGBA
@@ -29,7 +29,7 @@
2929
# - Support Code -
3030
# ----------------------------------------------------------------------------------------------------------------------
3131
def NormalizeRgb(r:int,g:int,b:int) -> Tuple[float, ...]:
32-
return Normalize(r,255),Normalize(g,255),Normalize(b,255)
32+
return r/255,g/255,b/255
3333

3434
numbers = (int,float)
3535

0 commit comments

Comments
 (0)