Skip to content

Enforce pathlib.Path instead of str#3350

Draft
deruyter92 wants to merge 4 commits into
jaap/safe_resolve_pathsfrom
jaap/pathlib_path_policy
Draft

Enforce pathlib.Path instead of str#3350
deruyter92 wants to merge 4 commits into
jaap/safe_resolve_pathsfrom
jaap/pathlib_path_policy

Conversation

@deruyter92
Copy link
Copy Markdown
Collaborator

@deruyter92 deruyter92 commented May 29, 2026

Motivation:
We currently use pathlib.Path and str mixed inconsistently throughout the codebase. Settling on pathlib.Path could make the codebase more uniform, and fix issues with brittle path resolvement, (e.g. see #3348).

This PR builds on top of #3349, which introduces safer path resolution.

Status:

  • low-hanging fruit: drop-in replacements of str with Path
  • adjust function signatures
  • enforce policy, linting ...
  • ..

@deruyter92 deruyter92 changed the base branch from main to jaap/safe_resolve_paths May 29, 2026 08:51
@C-Achard
Copy link
Copy Markdown
Collaborator

Strongly approve that this is a worthwhile effort, let me know if I can help!

@deruyter92 deruyter92 force-pushed the jaap/pathlib_path_policy branch from b9de7c2 to 810406a Compare June 4, 2026 14:55
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