Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: Adds a message logging function #2

wants to merge 1 commit into from

Conversation

StephaneBereux
Copy link
Owner

uie,

@StephaneBereux
Copy link
Owner Author

/review

Copy link

@ghost ghost left a 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):
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants