Skip to content

Commit

Permalink
Merge pull request #1032 from Amulet-Team/bug-1031
Browse files Browse the repository at this point in the history
Bug 1031
  • Loading branch information
gentlegiantJGC authored Mar 18, 2024
2 parents 3c4a25e + 106fd02 commit 9a3d9c5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion amulet_map_editor/__pyinstaller/hook-amulet_map_editor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PyInstaller.utils.hooks import collect_data_files, collect_submodules

hiddenimports = collect_submodules("amulet_map_editor")
hiddenimports = collect_submodules("amulet_map_editor") + collect_submodules("PIL")
datas = collect_data_files("amulet_map_editor")
7 changes: 4 additions & 3 deletions amulet_map_editor/api/lang.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Keys should match the regex [a-z.]+ (lower case a-z and the full stop character) and values can contain any unicode character.
Files must be utf-8 encoded.
"""

import glob
from typing import Dict, Optional, List, Tuple
import os
Expand All @@ -21,9 +22,9 @@
# there might be a proper way to do this but this should be enough for now

_lang_dirs: List[str] = [] # the language directories
_lang: Dict[
str, str
] = {} # a storage for the language strings. unique_identifier: language_string
_lang: Dict[str, str] = (
{}
) # a storage for the language strings. unique_identifier: language_string

_default_language = "en"
_active_language: Optional[str] = None
Expand Down
6 changes: 3 additions & 3 deletions amulet_map_editor/api/opengl/mesh/level/level.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def __init__(
self._selection = None
self._chunk_manager = ChunkManager(self.context_identifier, self.resource_pack)

self._last_rebuild_camera_location: Optional[
numpy.ndarray
] = None # x, z camera location
self._last_rebuild_camera_location: Optional[numpy.ndarray] = (
None # x, z camera location
)
self._needs_rebuild = (
True # Should we go back to the beginning and re-find chunks to rebuild
)
Expand Down
4 changes: 1 addition & 3 deletions amulet_map_editor/api/opengl/textureatlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,7 @@ def create_atlas(
return e.value


def create_atlas_iter(
texture_tuple: Tuple[str, ...]
) -> Generator[
def create_atlas_iter(texture_tuple: Tuple[str, ...]) -> Generator[
float,
None,
Tuple[Image.Image, Dict[str, Tuple[float, float, float, float]]],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def __init__(self, canvas: "EditCanvas"):
(2, 3)
) # the state of the cursor when editing starts
self._highlight = False # is a box being highlighted
self._initial_box: Optional[
NPArray2x3
] = None # the state of the box when editing started
self._initial_box: Optional[NPArray2x3] = (
None # the state of the box when editing started
)
self._pointer_mask: NPArray2x3 = numpy.zeros((2, 3), dtype=bool)
self._resizing = False # is a box being resized
self._pointer_distance2 = 0 # the pointer distance used when resizing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ def truncate(s: str, max_line_length: int = None) -> str:
max_line_length = max(-1, max_line_length)
s = "\n".join(
[
line[: max_line_length - 3] + "..."
if len(line) > max_line_length
else line
(
line[: max_line_length - 3] + "..."
if len(line) > max_line_length
else line
)
for line in s.split("\n")
]
)
Expand Down

0 comments on commit 9a3d9c5

Please sign in to comment.