More pep8 fixes. A tiny bit of refactoring.

This commit is contained in:
Storm Dragon
2025-07-07 00:42:23 -04:00
parent d28c18faed
commit 3390c25dfe
343 changed files with 11092 additions and 7582 deletions

View File

@ -2,19 +2,20 @@
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
# By Chrys, Storm Dragon, and contributors.
from fenrirscreenreader.core import debug
import re
from fenrirscreenreader.core import debug
class TableManager():
class TableManager:
def __init__(self):
self.headLine = ''
self.defaultSeparators = ['+', ';', '|', ' ']
self.headLine = ""
self.defaultSeparators = ["+", ";", "|", " "]
self.noOfHeadLineColumns = 0
self.headColumnSep = ''
self.rowColumnSep = ''
self.headColumnSep = ""
self.rowColumnSep = ""
def initialize(self, environment):
self.env = environment
@ -25,9 +26,9 @@ class TableManager():
def reset_table_mode(self):
self.set_head_line()
def set_head_column_sep(self, columnSep=''):
def set_head_column_sep(self, columnSep=""):
self.headColumnSep = columnSep
if columnSep == '':
if columnSep == "":
self.noOfHeadLineColumns = 0
else:
self.coun_no_of_head_columns()
@ -36,18 +37,18 @@ class TableManager():
pass
def search_for_head_column_sep(self, headLine):
if ' ' in headLine:
return ' '
return ''
if " " in headLine:
return " "
return ""
def set_row_column_sep(self, columnSep=''):
def set_row_column_sep(self, columnSep=""):
self.rowColumnSep = columnSep
def set_head_line(self, headLine=''):
def set_head_line(self, headLine=""):
self.set_head_column_sep()
self.set_row_column_sep()
if headLine != '':
if headLine != "":
sep = self.search_for_head_column_sep(headLine)
if sep != '':
if sep != "":
self.headLine = headLine
self.set_head_column_sep(sep)