Use pathlib to do the filepath manipulations in `File` class

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start by locating the File class and reading its path-manipulation methods, especially File.setExt. Compare that logic with Python's pathlib documentation and separate path handling from the tiers functionality; done means the File class no longer duplicates pathlib behavior and the purpose of setExt is resolved.

Written by the indexing model from the issue text.

Description

At the moment you have a class File that's implementing much of the logic that's found in Pathlib but in such a way that appears to be not cross platform and a potential source of bugs.

I'd suggest using Pathlib to handle all of the file path manipulations instead and then deal with any of the tiers functionality separately.

Perhaps I'm misunderstanding what File.setExt does, but I'm wondering why this code exists?

Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DoReCo/multitool

All issues in DoReCo/multitool

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.