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

Add ability to identify min_python version #2

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

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Aug 6, 2022

No description provided.

@ssbarnea
Copy link
Member Author

ssbarnea commented Aug 6, 2022

@RonnyPfannschmidt Please review. After implementing this, I will add one method for generating the JSON for GHA test matrix.

Copy link
Collaborator

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

IMHO ctors with logic ought to be avoid, they sabotage Testability among other details

# written, this was the oldest still supported version of Python
min_python: str = "3.7"

def __init__(self, path: Union[Path, str] = Path(".")) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use a named constructor for the logic part

@ssbarnea
Copy link
Member Author

ssbarnea commented Aug 7, 2022

Any suggestions? I would prefer to keep usage as simple as possible. Initially i was considering avoiding a class but sooner or later we will want to read other info about the project.

@RonnyPfannschmidt
Copy link
Collaborator

Use named constructors and/or a global construction function

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

Successfully merging this pull request may close these issues.

2 participants