From 87974de4000c22a077257493ffd1d3ac75c9c061 Mon Sep 17 00:00:00 2001 From: deng Date: Sat, 3 Feb 2024 19:52:47 +0800 Subject: [PATCH] add .orf extension and install precommit hook --- .flake8 | 2 ++ .pre-commit-config.yaml | 19 +++++++++++++++++++ organize_photos.py | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .flake8 create mode 100644 .pre-commit-config.yaml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..0d03a58 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +extend-ignore = E501 \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d41942c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +default_language_version: + python: python3.10 + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: check-added-large-files + - id: check-yaml + - id: check-docstring-first + + - repo: local + hooks: + - id: flake8 + name: flake8 + entry: flake8 + language: conda + types: [python] + always_run: true \ No newline at end of file diff --git a/organize_photos.py b/organize_photos.py index c1ca2ab..e4c613c 100644 --- a/organize_photos.py +++ b/organize_photos.py @@ -60,6 +60,6 @@ if __name__ == '__main__': image_dir = Path(image_dir) if not extensions: - extensions = '*.[pPjJrRhH][nNpPaAeE][gGeEwWiI]*' + extensions = '*.[pPjJrRhHoO][nNpPaAeErR][gGeEwWiIfF]*' main(image_dir=image_dir, extensions=extensions)