Skip to content

Théo Thénault#36

Open
TheoThenault wants to merge 7 commits intobcalou:mainfrom
TheoThenault:main
Open

Théo Thénault#36
TheoThenault wants to merge 7 commits intobcalou:mainfrom
TheoThenault:main

Conversation

@TheoThenault
Copy link
Copy Markdown

No description provided.

@TheoThenault TheoThenault marked this pull request as ready for review November 15, 2023 15:38
Copy link
Copy Markdown
Owner

@bcalou bcalou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Très bien, beaucoup d'attention apportée à la clarté. Pas grand chose à dire !

__main__.py Outdated

def main() -> None:
print("Hello world")
date = input("Veuillez saisir une date au format YYYY-MM-DD: ")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utiliser une boucle pour permettre à l'utilisateur de refaire une saisie en cas d'erreur


def is_format_valid(date: str) -> bool:
"""Verify if date follows the format YYYY-MM-DD"""
format_match = re.fullmatch(r"\d{4}[-]\d{1,2}[-]\d{1,2}", date)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bien

print("Veuillez saisir au date à partir de 1583-01-01")
return False

if not (0 < month < 13):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 <= month <= 12
C'est du détail, mais humainement plus concret non?

Comment on lines +4 to +8
# List of the offsets and exemples
# 2000 2
# 1700/2100 0
# 1800/2200 5
# 1900/2300 3
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bien

@bcalou
Copy link
Copy Markdown
Owner

bcalou commented Nov 24, 2023

Très bien structuré, facile à comprendre, bien formatté. C'est tout bon !

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