diff --git a/amulet_map_editor/__pyinstaller/hook-amulet_map_editor.py b/amulet_map_editor/__pyinstaller/hook-amulet_map_editor.py index 181590c0..901d0cc4 100644 --- a/amulet_map_editor/__pyinstaller/hook-amulet_map_editor.py +++ b/amulet_map_editor/__pyinstaller/hook-amulet_map_editor.py @@ -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") diff --git a/amulet_map_editor/api/lang.py b/amulet_map_editor/api/lang.py index 1a49cfce..4eee58a6 100644 --- a/amulet_map_editor/api/lang.py +++ b/amulet_map_editor/api/lang.py @@ -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 @@ -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 diff --git a/amulet_map_editor/api/opengl/mesh/level/level.py b/amulet_map_editor/api/opengl/mesh/level/level.py index 30dbd7b5..01c41643 100644 --- a/amulet_map_editor/api/opengl/mesh/level/level.py +++ b/amulet_map_editor/api/opengl/mesh/level/level.py @@ -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 ) diff --git a/amulet_map_editor/api/opengl/textureatlas.py b/amulet_map_editor/api/opengl/textureatlas.py index 79080da0..20ecc332 100644 --- a/amulet_map_editor/api/opengl/textureatlas.py +++ b/amulet_map_editor/api/opengl/textureatlas.py @@ -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]]], diff --git a/amulet_map_editor/programs/edit/api/behaviour/block_selection_behaviour.py b/amulet_map_editor/programs/edit/api/behaviour/block_selection_behaviour.py index a8ca54b3..9c150e4d 100644 --- a/amulet_map_editor/programs/edit/api/behaviour/block_selection_behaviour.py +++ b/amulet_map_editor/programs/edit/api/behaviour/block_selection_behaviour.py @@ -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 diff --git a/amulet_map_editor/programs/edit/api/behaviour/inspect_block_behaviour.py b/amulet_map_editor/programs/edit/api/behaviour/inspect_block_behaviour.py index d36e4161..c864adad 100644 --- a/amulet_map_editor/programs/edit/api/behaviour/inspect_block_behaviour.py +++ b/amulet_map_editor/programs/edit/api/behaviour/inspect_block_behaviour.py @@ -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") ] )