Skip to content

Add Area.get_dock - #323

Open
henriquegemignani wants to merge 1 commit into
mainfrom
feature/get-dock
Open

Add Area.get_dock#323
henriquegemignani wants to merge 1 commit into
mainfrom
feature/get-dock

Conversation

@henriquegemignani

Copy link
Copy Markdown
Member

No description provided.

Comment on lines +923 to +931
def get_dock(self, dock_name: str) -> ScriptInstance:
"""Gets the script object of type Dock with the given name."""
from retro_data_structures.properties.shared_objects import Dock

for instance in self.all_instances:
if instance.name == dock_name and instance.script_type in Dock.__args__:
return instance

raise KeyError(f"No object of type Dock and name {dock_name} found.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we consider adding a type parameter to get_instance, rather than having a dedicated method for docks in particular?

@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.93%. Comparing base (5b2b82d) to head (70a95d3).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/retro_data_structures/formats/mrea.py 73.33% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #323      +/-   ##
==========================================
- Coverage   74.95%   74.93%   -0.02%     
==========================================
  Files          95       95              
  Lines        6811     6818       +7     
  Branches      890      893       +3     
==========================================
+ Hits         5105     5109       +4     
- Misses       1537     1539       +2     
- Partials      169      170       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants