-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create TypedDict file for the json schema #279
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #279 +/- ##
==========================================
- Coverage 87.71% 85.85% -1.86%
==========================================
Files 35 35
Lines 1937 1987 +50
==========================================
+ Hits 1699 1706 +7
- Misses 238 281 +43
☔ View full report in Codecov by Sentry. |
currentScenario = self.get_scenario(scenario) | ||
currentScenario.actors_for_layer('default')[newActor.sName] = newActor | ||
newActor.vPos = [float(c) + offset for c, offset in zip(coords, offset)] | ||
newActor.vPos = [float(c) + offset for c, offset in zip(coords, offset, strict=True)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we already changing it and if we want to keep snake_case: Should be new_actor
and current_scenario
.
cosmetic_options: dict = configuration["cosmetic_patches"]["lua"]["custom_init"] | ||
inventory: dict[str, int] = configuration["starting_items"] | ||
inventory: ConfigurationStartingItems = configuration["starting_items"] | ||
starting_location: dict = configuration["starting_location"] | ||
starting_text: list[list[str]] = configuration.get("starting_text", []) | ||
configuration_identifier: str = configuration["configuration_identifier"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general: What's the idea of removing the type hints in most methods for the variables? In this part they are kept.
It makes reviewing stuff definetly harder as I need to know what is the type of certain fields of a parameter to follow the code.
...or I completly ignore it while reviewing and rely on mypy annotations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes I just removed because the type can be inferred automatically from the argument. Sometimes I just fixed it. I wasn't exactly consistent.
It's the classic thing of poluting the codebase with typing that can be inferred to make it easier when reading code in a bad ui
@@ -75,8 +79,13 @@ def create_custom_init(editor: PatcherEditor, configuration: dict) -> str: | |||
"ITEM_METROID_TOTAL_COUNT": 40, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment about me wondering if this is really required for Dread.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the game got really mad if some items were missing in this dict so I just kept all keys vanilla does.
""" | ||
Patches a door given a reference. | ||
|
||
@param door: A dictionary representing a requested door patch. | ||
@param door_ref: A dictionary representing a requested door patch. | ||
@param door_type: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a description to the parameter otherwise the docstring looks like only half done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fix the docstring's broken link and you go and ask for me to fix the docstring >:(
No description provided.