Skip to content

Conversation

@radarhere
Copy link

Suggestion for python-pillow#7407

In your PR at the moment,

def cmd_nmake(
    makefile: str | None = None,
    target: str = "",
    params: str | list[str] | tuple[str, ...] = None,
) -> str:
    if params is None:
        params = ""
    elif isinstance(params, (list, tuple)):
        params = " ".join(params)
    else:
        params = str(params)

params is either a string, list or tuple. When it is a string, str(params) is called? I find this odd, since it is already a string.

cmd_nmake is only called either without the third argument, or with a list, so maybe the simplest solution is just to restrict it to those two options?

@hugovk
Copy link
Owner

hugovk commented Sep 20, 2023

Yup, nice cleanup!

@hugovk hugovk merged commit 6e58b34 into hugovk:ci-appveyor-depends Sep 20, 2023
@radarhere radarhere deleted the ci-appveyor-depends branch September 20, 2023 11:48
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