diff options
| author | Cody Logan <cody@lokken.dev> | 2023-11-15 10:36:18 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-15 10:36:18 -0800 |
| commit | bf3a7db6cf83fa7d224d84c47b40cfe32603019c (patch) | |
| tree | ffeb394c3da9e4a2dcbc6a92caa956d5c83441eb /src/wikiget/file.py | |
| parent | 55a5311ee4da639a65bd60622315f3fff6936c9a (diff) | |
| download | wikiget-bf3a7db6cf83fa7d224d84c47b40cfe32603019c.tar.gz wikiget-bf3a7db6cf83fa7d224d84c47b40cfe32603019c.zip | |
Convert File.dest from a string to a Path (#14)
Diffstat (limited to 'src/wikiget/file.py')
| -rw-r--r-- | src/wikiget/file.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wikiget/file.py b/src/wikiget/file.py index cbd738a..e36feba 100644 --- a/src/wikiget/file.py +++ b/src/wikiget/file.py @@ -15,6 +15,7 @@ # You should have received a copy of the GNU General Public License # along with Wikiget. If not, see <https://www.gnu.org/licenses/>. +from pathlib import Path from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -47,7 +48,7 @@ class File: """ self.image: Image = None self.name = name - self.dest = dest if dest else name + self.dest = Path(dest) if dest else Path(name) self.site = site if site else DEFAULT_SITE def __eq__(self, other: object) -> bool: |
