Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BolunThompson committed Dec 12, 2024
1 parent fbf8d51 commit dcf1e32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions shasta/bash_to_shasta_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ def to_function_def_node(node: Command) -> DefunNode:
line_number = node.value.function_def.line
name = node.value.function_def.name
body = node.value.function_def.command
source_file = (
node.value.function_def.source_file
) # MICHAEL - for printing purposes this seems unimportant
IN_FUNCTION = True
ast_node = DefunNode(
line_number=line_number, name=to_arg_char(name), body=to_ast_node(body)
Expand Down
7 changes: 4 additions & 3 deletions shasta/subst.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

from .ast_node import *
from .ast_node import ArgChar, CArgChar

from math import log
from .flags import WordDescFlag

Expand Down Expand Up @@ -77,6 +78,6 @@ def utf8_to_unicode(c: int) -> int:
b = c.to_bytes(num_bytes, byteorder="big")
try:
s = b.decode("utf-8")
return ord(s)
except:
except UnicodeDecodeError:
return c
return ord(s)

0 comments on commit dcf1e32

Please sign in to comment.