Replace with standard libraries such as pathlib

Open
#101 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Begin with src/commoncode/paths.py and src/commoncode/filetype.py, then inspect how their path and file-type behavior is used elsewhere. Identify the portions that can be replaced by Python's pathlib while preserving existing behavior, and run the repository's available tests to verify the refactor.

Written by the indexing model from the issue text.

Description

A lot of the code in certain files, such as src/commoncode/paths.py and src/commoncode/filetype.py and possible others can be replaced by standard methods from the pathlib module. This has a few benefits:

  1. less maintenance on your part
  2. pathlib has seen more testing than your code
  3. possible optimisations in pathlib
Dominant language
Python
Stars
4
Forks
25
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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 aboutcode-org/commoncode

All issues in aboutcode-org/commoncode

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.