interrogate icon indicating copy to clipboard operation
interrogate copied to clipboard

Replaced `os.path` with `pathlib`

Open trag1c opened this issue 1 year ago • 5 comments
trafficstars

Hey, I just made a Pull Request!

Description

Changes all occurrences of os.path to use pathlib instead.

Motivation and Context

Closes #179

Have you tested this? If so, how?

Updated unit tests :)

Checklist for PR author(s)

  • [x] Changes are covered by unit tests (no major decrease in code coverage %).
  • [x] All tests pass.
  • [x] Docstring coverage is 100% via tox -e docs or interrogate -c pyproject.toml (I mean, we should set a good example :smile:).
  • [ ] Updates to documentation:
    • [x] Document any relevant additions/changes in README.rst.
    • [x] Manually update both the README.rst and docs/index.rst for any new/changed CLI flags.
    • [ ] Any changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in the project's __init__.py file.

Release note

NONE

trag1c avatar May 22 '24 21:05 trag1c

Not sure if this deserves a release note or any versionchanged directives.

I'll take a look at Windows' fails tomorrow :+1:

trag1c avatar May 22 '24 21:05 trag1c

I'll take a look at Windows' fails tomorrow 👍

Took a bit longer but I'm getting OSErrors, seems like Windows can't install cairosvg 🤔 I feel like I'm doing something wrong here.

@econchick Could you approve the workflow? 😄

trag1c avatar May 25 '24 07:05 trag1c

Have been here myself.

Getting the paths to work on all platforms and only being able to test thru a gh workflow.

Here is a module that is specifically for the challenge this PR is about

https://github.com/msftcangoblowm/wreck/blob/master/src/wreck/_safe_path.py

If you hit a brick wall or feel going around in circles, this code might be helpful

msftcangoblowm avatar Feb 18 '25 09:02 msftcangoblowm

I like that transition to pathlib, but I found many mistakes and code parts that can be improved. See my list of suggestions.

I found this PR by accident. I'm no contributor to this repository. I'm just an excessive Python user.

Thanks, a lot of these are good suggestions!

Not sure what's up with the snark though (e.g. "Since when is the abbreviation of filename fl?"), I didn't write the original code, just touching up the os.path bits :)

I'll probably hold off on applying these until there's some interest from Lynn in this PR actually going somewhere.

trag1c avatar Apr 21 '25 09:04 trag1c

@trag1c The comment about fl was not meant for you, just for the maintainer when checking this review :)

Paebbels avatar Apr 21 '25 09:04 Paebbels