From f771d68d73dc77218bb7ae9d544ec070b8791ff6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 17:54:35 +0000 Subject: [PATCH 1/4] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.3 → v0.7.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.3...v0.7.4) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8b2f9c6e..4acfc41d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.3 + rev: v0.7.4 hooks: - id: ruff From e23a00130074065c7f31921dca464631a1d636a0 Mon Sep 17 00:00:00 2001 From: Alexander Piskun Date: Fri, 22 Nov 2024 19:43:41 +0300 Subject: [PATCH 2/4] fix for ruff UP015 rule Signed-off-by: Alexander Piskun --- nc_py_api/ex_app/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nc_py_api/ex_app/misc.py b/nc_py_api/ex_app/misc.py index 5fbc0954..b6902a2b 100644 --- a/nc_py_api/ex_app/misc.py +++ b/nc_py_api/ex_app/misc.py @@ -33,7 +33,7 @@ def verify_version(finalize_update: bool = True) -> tuple[str, str] | None: """ version_file_path = os.path.join(persistent_storage(), "_version.info") r = None - with open(version_file_path, "a+t", encoding="UTF-8") as version_file: + with open(version_file_path, "a+", encoding="UTF-8") as version_file: version_file.seek(0) old_version = version_file.read() if old_version != os.environ["APP_VERSION"]: From 103ce638bcc1045c98fc7d3a78a2f437f9db30c9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:52:26 +0000 Subject: [PATCH 3/4] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.0 → v0.9.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.0...v0.9.3) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 16ec082e..7e8c04fa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.0 + rev: v0.9.3 hooks: - id: ruff From df316c67e1d5320e467a0ecdf11343c8ad70d428 Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Sun, 2 Feb 2025 17:35:36 +0300 Subject: [PATCH 4/4] rename internal files to calm the new "ruff" rule Signed-off-by: Alexander Piskun --- docs/reference/Calendar.rst | 2 +- nc_py_api/{calendar.py => calendar_api.py} | 0 nc_py_api/ex_app/__init__.py | 2 +- nc_py_api/ex_app/{logging.py => logger.py} | 0 nc_py_api/nextcloud.py | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename nc_py_api/{calendar.py => calendar_api.py} (100%) rename nc_py_api/ex_app/{logging.py => logger.py} (100%) diff --git a/docs/reference/Calendar.rst b/docs/reference/Calendar.rst index adb637ac..b240abe9 100644 --- a/docs/reference/Calendar.rst +++ b/docs/reference/Calendar.rst @@ -1,4 +1,4 @@ -.. py:currentmodule:: nc_py_api.calendar +.. py:currentmodule:: nc_py_api.calendar_api Calendar API ============ diff --git a/nc_py_api/calendar.py b/nc_py_api/calendar_api.py similarity index 100% rename from nc_py_api/calendar.py rename to nc_py_api/calendar_api.py diff --git a/nc_py_api/ex_app/__init__.py b/nc_py_api/ex_app/__init__.py index 84104cd4..7ded4d38 100644 --- a/nc_py_api/ex_app/__init__.py +++ b/nc_py_api/ex_app/__init__.py @@ -10,7 +10,7 @@ set_handlers, talk_bot_msg, ) -from .logging import setup_nextcloud_logging +from .logger import setup_nextcloud_logging from .misc import ( get_computation_device, get_model_path, diff --git a/nc_py_api/ex_app/logging.py b/nc_py_api/ex_app/logger.py similarity index 100% rename from nc_py_api/ex_app/logging.py rename to nc_py_api/ex_app/logger.py diff --git a/nc_py_api/nextcloud.py b/nc_py_api/nextcloud.py index 54a46a5f..97eee898 100644 --- a/nc_py_api/nextcloud.py +++ b/nc_py_api/nextcloud.py @@ -29,7 +29,7 @@ from ._theming import ThemingInfo, get_parsed_theme from .activity import _ActivityAPI, _AsyncActivityAPI from .apps import _AppsAPI, _AsyncAppsAPI -from .calendar import _CalendarAPI +from .calendar_api import _CalendarAPI from .ex_app.defs import LogLvl from .ex_app.events_listener import AsyncEventsListenerAPI, EventsListenerAPI from .ex_app.occ_commands import AsyncOccCommandsAPI, OccCommandsAPI