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

[py] Make get_screenshot_as_file() work with pathlib.Paths #11095

Merged
merged 1 commit into from
Oct 8, 2022

Conversation

NickCrews
Copy link
Contributor

It currently expects a string (or something with .lower()), but accepting Paths seems quite reasonable.

I supposed if we wanted to be more strict and ensure the passed thing was path-like, we could instead do str(Path(filename)).lower()

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

It currently expects a string (or something with .lower()), but accepting Paths seems quite reasonable.
@CLAassistant
Copy link

CLAassistant commented Oct 8, 2022

CLA assistant check
All committers have signed the CLA.

@NickCrews NickCrews changed the title Make get_screenshot_as_file() work with pathlib.Paths [py] Make get_screenshot_as_file() work with pathlib.Paths Oct 8, 2022
@symonk
Copy link
Member

symonk commented Oct 8, 2022

Thanks @NickCrews, it's on my radar to convert everything to support pathlib

@NickCrews
Copy link
Contributor Author

Just signed the CLA.

It looks to me like the CI failure is unrelated?

@symonk
Copy link
Member

symonk commented Oct 8, 2022

Thanks @NickCrews yep it is, some issues ongoing atm - Thanks for the contribution, much appreciated

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.

3 participants