-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: Adds a message logging function #2
base: main
Are you sure you want to change the base?
Conversation
/review |
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.
Review summary
Thanks for the PR 🙏
PR overview
- 1 comment about [missing-type-annotations]
- 1 comment about [late-import]
Add the following reactions to this comment to let us know if:
- 😕 the review missed something important
@@ -19,3 +19,13 @@ def convert_fahrenheit_to_celsius(input_temperatures: List[float]) -> List[float | |||
""" | |||
|
|||
return [(fahrenheit_temp - 32) * 5 / 9 for fahrenheit_temp in input_temperatures] | |||
|
|||
|
|||
def log_message(message): |
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.
Would you mind adding type annotations? 🙏
Pattern explanation 👈
In Python, type annotations are not enforced. But that can be valuable for debugging using mypy, and for your collaborators' understanding. Check here for reference.Replacement example
Here is an example of how you could handle this:
def is_upper(variable_name: str) -> bool:
This comment is about [missing-type-annotations]. Add the following reactions on this comment to let us know if:
- 👀 that doesn't seem right
- 👎 this isn't important for you right now
- 😕 that explanation wasn't clear
Args: | ||
message: a string | ||
""" | ||
import logging |
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.
Imports are expected to be at the top of the module
Pattern explanation 👈
Just like any other statements, imports require a given amount of time to be executed. However, because they aren't dynamic (you always import the same module, it's not an input of your program), you can avoid performing the import more times than necessary by placing them at the top of the module. Check here for reference.This comment is about [late-import]. Add the following reactions on this comment to let us know if:
- 👀 that doesn't seem right
- 👎 this isn't important for you right now
- 😕 that explanation wasn't clear
uie,