Skip to content

Conversation

@sandeepsuryaprasad
Copy link
Contributor

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Currently we are using os module to check if the file exist's in local machine in function is_local_file. I have just optimised the current logic using pathlib module which uses OO approach.

Motivation and Context

  • The logic to check if the file exists on local disk is bit lengthy using os module, which we are currently doing in is_local_file function in remote/file_detector.py module.

  • I have just optimised the logic using pathlib module which takes just one line of code.

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.

@sandeepsuryaprasad sandeepsuryaprasad changed the title [py] used pathlib module to check if the file exist in remote/file_detector.py [py] used pathlib module to check if the file exist in remote/file_detector.py Jun 25, 2023
Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you!

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