Skip to content

Commit

Permalink
lint(): fix code to pass linting
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitMY committed Jan 4, 2024
1 parent 157bd56 commit 63881cd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies = [
dev = [
"pytest",
"pylint",
"numpy", # to test visualizer
]

[tool.yapf]
Expand All @@ -27,6 +28,7 @@ disable = [
"C0115", # Missing class docstring
"C0116", # Missing function or method docstring
]
good-names = ["i", "f", "x", "y"]

[tool.setuptools]
packages = [
Expand Down
8 changes: 4 additions & 4 deletions signwriting/formats/fsw_to_swu.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ def key2id(key: str) -> int:
return ((base - 0x100) * 96) + (fill * 16) + rotation + 1


def symbol_line(id: int) -> str:
return chr(id + 0xF0000)
def symbol_line(symbol_id: int) -> str:
return chr(symbol_id + 0xF0000)


def symbol_fill(id: int) -> str:
return chr(id + 0x100000)
def symbol_fill(symbol_id: int) -> str:
return chr(symbol_id + 0x100000)
3 changes: 1 addition & 2 deletions signwriting/visualizer/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def signwriting_to_image(fsw: str) -> Image:
min_x = min(positions, key=lambda p: p[0])[0]
min_y = min(positions, key=lambda p: p[1])[1]
max_x, max_y, = sign["box"]["position"]
size = (max_x - min_x, max_y - min_y)
img = Image.new('RGBA', size, (255, 255, 255, 0))
img = Image.new('RGBA', (max_x - min_x, max_y - min_y), (255, 255, 255, 0))
draw = ImageDraw.Draw(img)

line_font = get_font('SuttonSignWritingLine')
Expand Down

0 comments on commit 63881cd

Please sign in to comment.