Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mbasaglia committed Oct 17, 2024
1 parent 164ad30 commit 656ab8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tools/code_processing/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def indent_at(string, pos):
if pos <= 0:
return ""

newline_before = string.rfind('\n', 0, pos-1)
newline_before = string.rfind('\n', 0, pos - 1)
if newline_before == -1:
return ""

Expand Down
8 changes: 1 addition & 7 deletions tools/code_processing/python_to_ts.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import re
import os
import sys
import ast
import pprint
import inspect
import argparse


def snake_to_lower_camel(string):
Expand Down Expand Up @@ -161,9 +158,6 @@ def delete_statement(self, targets):
def type_alias(self, obj):
raise NotImplementedError

def convert_name(self, name, annotation):
raise NotImplementedError

def expr_func(self, name, args):
raise NotImplementedError

Expand Down Expand Up @@ -258,6 +252,7 @@ def convert_ast(self, obj):
pattern = None
else:
pattern = self.expression_to_string(obj.pattern)
self.begin_switch_case(pattern)
with IndentationManager(self, False):
self.convert_ast(obj.body)
self.end_switch_case()
Expand Down Expand Up @@ -558,4 +553,3 @@ def format_comment(self, value):

def expression_statement(self, v):
self.push_code(v + ";")

9 changes: 3 additions & 6 deletions tools/lottie_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -1242,12 +1242,9 @@ def render_code(self, parent, index, language, code, selector):
def render_pseudocode(self, parent, pseudo: str):
pre = etree.SubElement(parent, "pre")
for line in pseudo.splitlines():
# stripped = line.lstrip()
# indent = line[0:len(line) - len(stripped)]
# etree.SubElement(pre, "span").text = indent
l = etree.SubElement(pre, "span")
l.text = line
l.tail = "\n"
span = etree.SubElement(pre, "span")
span.text = line
span.tail = "\n"


class LottieExtension(Extension):
Expand Down

0 comments on commit 656ab8f

Please sign in to comment.