Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
olijeffers0n committed Jul 1, 2024
1 parent f02d038 commit 9f00b06
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
12 changes: 7 additions & 5 deletions rustplus/rust_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
translate_id_to_stack,
generate_grid,
fetch_avatar_icon,
format_coord, convert_marker, convert_monument
format_coord,
convert_marker,
convert_monument,
)
from .remote.ratelimiter import RateLimiter

Expand Down Expand Up @@ -213,9 +215,7 @@ async def get_markers(self) -> Union[List[RustMarker], None]:
if response is None:
return None

return [
RustMarker(marker) for marker in response.response.map_markers.markers
]
return [RustMarker(marker) for marker in response.response.map_markers.markers]

async def get_map(
self,
Expand Down Expand Up @@ -262,7 +262,9 @@ async def get_map(
self.logger.error(f"Error opening image: {e}")
return None

output = output.crop((500, 500, map_packet.height - 500, map_packet.width - 500))
output = output.crop(
(500, 500, map_packet.height - 500, map_packet.width - 500)
)
output = output.resize((map_size, map_size), Image.LANCZOS).convert("RGBA")

if add_grid:
Expand Down
10 changes: 9 additions & 1 deletion rustplus/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
from .deprecated import deprecated
from .utils import convert_time, generate_grid, fetch_avatar_icon, format_coord, convert_marker, convert_monument, convert_event_type_to_name
from .utils import (
convert_time,
generate_grid,
fetch_avatar_icon,
format_coord,
convert_marker,
convert_monument,
convert_event_type_to_name,
)
from .grab_items import translate_stack_to_id, translate_id_to_stack
from .yielding_event import YieldingEvent
4 changes: 3 additions & 1 deletion rustplus/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ def convert_monument(name: str, override_images: Dict[str, Image.Image]) -> Imag
with resources.path(ICONS_PATH, "swamp.png") as path:
icon = Image.open(path).convert("RGBA")
else:
logging.getLogger("rustplus.py").info(f"{name} - Has no icon, report this as an issue")
logging.getLogger("rustplus.py").info(
f"{name} - Has no icon, report this as an issue"
)
with resources.path(ICONS_PATH, "icon.png") as path:
icon = Image.open(path).convert("RGBA")

Expand Down

0 comments on commit 9f00b06

Please sign in to comment.