Skip to content

Commit

Permalink
fix: add spaces on function arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsanima committed Jun 14, 2021
1 parent 20439f5 commit b45720c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 28 deletions.
5 changes: 3 additions & 2 deletions src/mdsanima_dev/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def complex_color():
return sx, xm, ex


def show_complex_color(number:bool=False):
def show_complex_color(number: bool = False):
"""
Function prints all available colors with a number or only text.
Expand Down Expand Up @@ -67,7 +67,8 @@ def show_complex_color(number:bool=False):
return print(done)


def get_complex_color(text:str='mdsanima', color:int=255, ends=None) -> str:
def get_complex_color(text: str = 'mdsanima',
color: int = 255, ends = None) -> str:
"""
This feature allows you to print colored text to the output of the
console. Now the function works the same like print function.
Expand Down
17 changes: 7 additions & 10 deletions src/mdsanima_dev/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@ def emoji_get_url_data(emoji_url):


def emoji_clean_url_data(
bhead:bool=False,
mhead:bool=False,
ucode:bool=False,
emoji:bool=False,
ename:bool=False,
emoji_url:str=emoji_lis_url
) -> dict:
bhead: bool = False, mhead: bool = False, ucode: bool = False,
emoji: bool = False, ename: bool = False,
emoji_url: str = emoji_lis_url) -> dict:
"""
This funciton is used to clean up previously requested data and store this
data in dictionary `.json` file in `json` folder. Default this function
Expand Down Expand Up @@ -310,7 +306,7 @@ def emo_medium_head(self):
.ljust(3), 215, 167, True, True, t_col)
self.tab(t_col).bot(32)

def emo_all(self, number:bool=False, names:bool=False):
def emo_all(self, number: bool = False, names: bool = False):
e_head = self.emo[self.emo_list]['emo']
e_heder = str('EMOJI').upper().ljust(21)

Expand Down Expand Up @@ -338,7 +334,8 @@ def emo_all(self, number:bool=False, names:bool=False):
self.mds(str(name), 243, '\n')) if names else ''
print('\n')

def emo_head(self, bhead, mhead, number:bool=False, names:bool=False):
def emo_head(self, bhead, mhead,
number: bool = False, names: bool = False):
e_head = self.emo[self.emo_list]['emo']

# Initial table color variable.
Expand All @@ -363,7 +360,7 @@ def emo_head(self, bhead, mhead, number:bool=False, names:bool=False):
# chk = '' if names else '\r'
chk = 1 if names else print('\r')

def emoji(self, number:int):
def emoji(self, number: int):
e_head = self.emo[self.emo_list]['emo']
for key_bh in e_head:
for key_mh in e_head[key_bh]:
Expand Down
31 changes: 15 additions & 16 deletions src/mdsanima_dev/utils/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self):
def colors(self, color:int=255) -> int:
self.tab_color = color

def connect(self, top:bool, length:int, bot:bool) -> str:
def connect(self, top: bool, length: int, bot: bool) -> str:
header = ('\u250c' + ('\u2500' * length) + '\u2510')
conect = ('\u251c' + ('\u2500' * length) + '\u2524')
bottom = ('\u2514' + ('\u2500' * length) + '\u2518')
Expand All @@ -24,10 +24,9 @@ def connect(self, top:bool, length:int, bot:bool) -> str:
self.con_bot = '' if bot else bottom

def headers(self,
header:str, hcolor:int=255,
top:bool=False, bot:bool=False,
tcolor:int=255
) -> str:
header: str, hcolor: int = 255,
top: bool = False, bot: bool = False,
tcolor: int = 255) -> str:
self.header = header
self.color = hcolor
head_len = len(self.header) + 2
Expand All @@ -48,11 +47,10 @@ def headers(self,
self.mds(self.bot, self.tab_color)

def content(self,
content_key:str, content_val:str,
key_color:int=255, val_color:int=255,
top:bool=False, bot:bool=False,
tcolor:int=255,
) -> str:
content_key: str, content_val: str,
key_color: int = 255, val_color: int = 255,
top: bool = False, bot: bool = False,
tcolor: int = 255) -> str:
self.key = content_key
self.val = content_val
self.key_col = key_color
Expand Down Expand Up @@ -83,29 +81,30 @@ def content(self,


class table_elem:
def __init__(self, color:int) -> str:
def __init__(self, color: int) -> str:
self.mds = colors.get_complex_color
self.color = color

def top(self, length:int) -> str:
def top(self, length: int) -> str:
self.header = ('\u250c' + ('\u2500' * length) + '\u2510')
self.mds(self.header, self.color)

def mid(self, length:int) -> str:
def mid(self, length: int) -> str:
self.middle = ('\u251c' + ('\u2500' * length) + '\u2524')
self.mds(self.middle, self.color)

def bot(self, length:int) -> str:
def bot(self, length: int) -> str:
self.bottom = ('\u2514' + ('\u2500' * length) + '\u2518')
self.mds(self.bottom, self.color)

def hed(self, length:int, text:str, text_color:int) -> str:
def hed(self, length: int, text: str, text_color: int) -> str:
self.text = text.ljust(length-1)
self.mds('\u2502', self.color, '')
self.mds(' ' + self.text.upper(), text_color, '')
self.mds('\u2502', self.color)

def con(self, length:int, key:str, val:str, k_clr:int, v_clr:int) -> str:
def con(self, length: int, key: str, val: str,
k_clr: int, v_clr: int) -> str:
self.con_key = key
self.con_val = val
k_len = len(key)
Expand Down

0 comments on commit b45720c

Please sign in to comment.