Cleanup setCheckState

Fix word splitting when auto-tagging
Remove commented code
This commit is contained in:
lordwelch 2022-05-22 20:02:49 -07:00
parent 563d05cdfd
commit f2ad417069
3 changed files with 0 additions and 28 deletions

View File

@ -138,13 +138,6 @@ class Lexer:
self.backup()
# NextItem returns the next item from the input.
# Called by the parser, not in the lexing goroutine.
# def next_item(self) -> Item:
# item: Item = self.items.get()
# self.lastPos = item.pos
# return item
def scan_number(self) -> bool:
digits = "0123456789"
@ -253,7 +246,6 @@ def lex_filename(lex: Lexer) -> Optional[Callable[[Lexer], Optional[Callable]]]:
if lex.sbrace_depth < 0:
return errorf(lex, "unexpected right brace " + r)
elif is_symbol(r):
# L.backup()
lex.emit(ItemType.Symbol)
else:
return errorf(lex, "unrecognized character in action: " + r)

View File

@ -404,7 +404,6 @@ def parse(p: Parser) -> Optional[Callable[[Parser], Optional[Callable]]]:
if item.typ == filenamelexer.ItemType.Number:
likely_year = False
if p.firstItem and p.first_is_alt:
# raise Exception("fuck you")
p.alt = True
return parse_issue_number

View File

@ -34,25 +34,6 @@ class UtilsVars:
already_fixed_encoding = False
def get_actual_preferred_encoding() -> str:
preferred_encoding = locale.getpreferredencoding()
if platform.system() == "Darwin":
preferred_encoding = "utf-8"
return preferred_encoding
# def fix_output_encoding() -> None:
# if not UtilsVars.already_fixed_encoding:
# # this reads the environment and inits the right locale
# locale.setlocale(locale.LC_ALL, "")
# # try to make stdout/stderr encodings happy for unicode printing
# preferred_encoding = get_actual_preferred_encoding()
# sys.stdout = codecs.getwriter(preferred_encoding)(sys.stdout)
# sys.stderr = codecs.getwriter(preferred_encoding)(sys.stderr)
# UtilsVars.already_fixed_encoding = True
def get_recursive_filelist(pathlist: List[str]) -> List[str]:
"""Get a recursive list of of all files under all path items in the list"""