chore: remove unneeded logging and code marked unreachable that has not been reached. - #4305
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4305 +/- ##
==========================================
+ Coverage 88.40% 88.46% +0.05%
==========================================
Files 294 294
Lines 39197 39186 -11
==========================================
+ Hits 34652 34665 +13
+ Misses 4545 4521 -24
Help us with your feedback. Take ten seconds to tell us how you rate us. |
jennifer-richards
left a comment
There was a problem hiding this comment.
A couple small comments inline. Probably should remove the empty save() method but the other is just a thought.
| prev_rev = doc.rev | ||
| # not sure what to do if non-numeric values come back, so at least log it | ||
| log.assertion('doc.rfc_number().isdigit()') | ||
| log.assertion('doc.rfc_number().isdigit()') # .rfc_number() is expensive... |
There was a problem hiding this comment.
Expensive, but at least cached. At the moment the value is used again in real code immediately after - could catch exceptions there instead of asserting ahead of time to reduce the risk that the assertions outlive the code they protect.
There was a problem hiding this comment.
Well, as you note, it's not clear what to do if the expectations of those functions are violated, and I view the assertions as a short term safety net checking that we didn't have broken data. We could probably just pull the asserts, but since they aren't really adding load, leaving them for awhile longer won't hurt us.
No description provided.