-
Notifications
You must be signed in to change notification settings - Fork 185
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
Replace timeago #587
Replace timeago #587
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #587 +/- ##
==========================================
- Coverage 61.78% 61.37% -0.42%
==========================================
Files 14 14
Lines 2986 2985 -1
==========================================
- Hits 1845 1832 -13
- Misses 1141 1153 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I think that this largely looks fine to me, and I certainly like getting rid of dependencies and creating more code we can properly add types to (and already have, basically). If you're able to, I do think I would like to see some tests of this code, since by no longer relying on an external library we're probably slightly more responsible for ensuring the output is sane! I suspect this code would also be likely to be moved around by #579, but that is of course still in planning stages, just noting here for good measure. |
Replace the timeago library with a simple function
f12f052
to
b5d1b76
Compare
_timeago is not specialized for mesh interfaces so it is factored out into a private function
@ianmcorvidae Rebased and updated with tests and some cleanup |
I fixed up pylint complaining about a lack of a docstring, and added a test using fuzzing (just for fun, really, I've been learning how to use that library recently) and merged. Thanks for the contribution! |
Replace the timeago library with a simple function. This reduces the amount of Python dependencies making the tool easier to package for Linux distributions. Additionally it handles unexpected timestamps from the future, if any, by returning
None