Skip to content

refactor: remove ignores for PTH #474

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

Merged
merged 16 commits into from
Feb 26, 2025
Merged

refactor: remove ignores for PTH #474

merged 16 commits into from
Feb 26, 2025

Conversation

StefanThoene
Copy link
Collaborator

@StefanThoene StefanThoene commented Feb 25, 2025

Description

Move from os.path to pathlib.Path, to full fill ruff PTH requirements

Issue linked

#475

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate tests (unit, integration, system).
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved by the PR if any.
  • I have assigned this PR to myself.
  • I have made sure that the title of my PR follows Conventional commits style (e.g. feat: add optical property)
  • I have agreed with the Contributor License Agreement (CLA).

@github-actions github-actions bot added maintenance Package and maintenance related testing Anything related to tests labels Feb 25, 2025
@StefanThoene StefanThoene linked an issue Feb 25, 2025 that may be closed by this pull request
@StefanThoene StefanThoene marked this pull request as ready for review February 25, 2025 15:07
@StefanThoene StefanThoene requested review from echambla, pluAtAnsys and SMoraisAnsys and removed request for echambla and pluAtAnsys February 25, 2025 15:07
@StefanThoene StefanThoene self-assigned this Feb 25, 2025
jomadec
jomadec previously approved these changes Feb 25, 2025
Copy link
Contributor

@SMoraisAnsys SMoraisAnsys left a comment

Choose a reason for hiding this comment

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

Two remarks:

  • Would it be possible to directly us Path(...) / "..." instead of Path().joinpath(...) ? In fact I would avoid using joinpath to ease readability (however there might be a reason to keep it that I'm not aware of).
  • Could the core modules be updated to accept str or Path instead of str only ? You could then cast to Path automaticaly to handle both str and Path and, when needed, return to str, e.g. when calling stubs

@StefanThoene
Copy link
Collaborator Author

* Could the core modules be updated to accept `str` or `Path` instead of `str` only ? You could then cast to `Path` automaticaly to handle both `str` and `Path` and, when needed, return to `str`, e.g. when calling stubs

yes it is possible but that would be a second PR/issue it would mean a lot of small changes would be needed

in regards to the first i can do that

Co-authored-by: Sébastien Morais <[email protected]>
@StefanThoene StefanThoene requested a review from jomadec February 25, 2025 17:02
@SMoraisAnsys
Copy link
Contributor

* Could the core modules be updated to accept `str` or `Path` instead of `str` only ? You could then cast to `Path` automaticaly to handle both `str` and `Path` and, when needed, return to `str`, e.g. when calling stubs

yes it is possible but that would be a second PR/issue it would mean a lot of small changes would be needed

in regards to the first i can do that

Ok, I'll let you handle that later on then :)

SMoraisAnsys
SMoraisAnsys previously approved these changes Feb 26, 2025
Copy link
Contributor

@SMoraisAnsys SMoraisAnsys left a comment

Choose a reason for hiding this comment

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

LGTM, thanks handling that task !

@StefanThoene StefanThoene merged commit b754f84 into main Feb 26, 2025
27 checks passed
@StefanThoene StefanThoene deleted the refactor/ruff_PTH branch February 26, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Package and maintenance related testing Anything related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove ruff ignore "PTH", # flake8-use-pathlib
5 participants