Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Clean up use of pathlib.Path #1020

@baagaard-usgs

Description

@baagaard-usgs

There are lots of places where we have Path(filepath) where filepath is a pathlib.Path. This is unnecessary. Once we have a pathlib.Path object, additional operations produce pathlib.Path objects.

All of the following produce pathlib.Path objects.

filepath1 = filepath.parent
filepath2 = filepath / "subdir"

Additionally, we should replace use of os (e.g., os.join, os.makedirs, etc) with pathlib.Path methods. The code is more concise and easier to read.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions