Skip to content

Add ability to identify min_python version#2

Open
ssbarnea wants to merge 1 commit into
mainfrom
feat/code
Open

Add ability to identify min_python version#2
ssbarnea wants to merge 1 commit into
mainfrom
feat/code

Conversation

@ssbarnea

@ssbarnea ssbarnea commented Aug 6, 2022

Copy link
Copy Markdown
Member

No description provided.

@ssbarnea

ssbarnea commented Aug 6, 2022

Copy link
Copy Markdown
Member Author

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

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread src/ppinfo/__init__.py
# 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
Copy Markdown
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

ssbarnea commented Aug 7, 2022

Copy link
Copy Markdown
Member Author

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