Fix steam_length → stem_length typo in DigRivers#84
Conversation
Co-authored-by: spiani <8956990+spiani@users.noreply.github.com>
steam_length → stem_length typo in DigRivers
There was a problem hiding this comment.
Pull request overview
Fixes a typo in the DigRivers action by aligning helper naming, parameter naming, and user-facing strings with the existing stem_length terminology used in config and documentation.
Changes:
- Renamed helper
_steam_length_to_stemto_stem_length_to_stem. - Renamed helper parameter
steam_lengthtostem_lengththroughout the method. - Updated log/error strings and the call site to use the corrected names.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "Stem length must be a positive number of cell: received " | ||
| f"{stem_length}" | ||
| ) | ||
| river_side = Direction(side) |
There was a problem hiding this comment.
The docstring says the river flows "in the direction opposite to its defined side", but the implementation uses river_side = Direction(side) and builds Movement(stem_length, river_side) (i.e., same direction as side). Please either update the docstring to match the actual movement direction, or change the code to use the opposite direction (e.g., -Direction(side)) if the doc is correct.
| river_side = Direction(side) | |
| river_side = -Direction(side) |
| Returns: | ||
| A single `Movement`, representing the river's stem based on its | ||
| direction and length. | ||
|
|
There was a problem hiding this comment.
The Returns: section says this function returns "A single Movement", but the signature and implementation return a List[Movement] (a list containing one Movement). Update the docstring return description to match the actual return type/value.
| raise ValueError( | ||
| "Steam length must be a positive number of cell: received " | ||
| f"{steam_length}" | ||
| "Stem length must be a positive number of cell: received " |
There was a problem hiding this comment.
The error message has a grammatical typo: "positive number of cell" should be "positive number of cells" (and possibly "cells:" vs "cells;" depending on style). This string is user-facing, so it’s worth correcting while touching it.
| "Stem length must be a positive number of cell: received " | |
| "Stem length must be a positive number of cells: received " |
_steam_length_to_stemand itssteam_lengthparameter were a typo inconsistent with thestem_lengthconfig key and docstring terminology.Changes
_steam_length_to_stem→_stem_length_to_stemsteam_length→stem_lengththroughout the method"Steam length..."→"Stem length..."💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.