Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
)

- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.10.0
hooks:
- id: black
files: >-
Expand All @@ -41,12 +41,12 @@ repos:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.1
hooks:
- id: ruff

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.0
rev: v1.6.1
hooks:
- id: mypy
files: nc_py_api/
Expand Down
1 change: 1 addition & 0 deletions examples/as_app/skeleton/src/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Simplest example."""

from contextlib import asynccontextmanager

from fastapi import FastAPI
Expand Down
1 change: 1 addition & 0 deletions examples/as_app/talk_bot/src/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Example of an application(currency convertor) that uses Talk Bot APIs."""

import re
from contextlib import asynccontextmanager
from typing import Annotated
Expand Down
1 change: 1 addition & 0 deletions examples/as_app/talk_bot_ai/src/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Example of an application that uses Python Transformers library with Talk Bot APIs."""

import re
from contextlib import asynccontextmanager
from typing import Annotated
Expand Down
1 change: 1 addition & 0 deletions examples/as_app/to_gif/src/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Simplest example of files_dropdown_menu + notification."""

import tempfile
from contextlib import asynccontextmanager
from os import path
Expand Down
1 change: 0 additions & 1 deletion nc_py_api/_deffered_error.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""DeferredError class taken from PIL._util.py file."""


class DeferredError: # pylint: disable=too-few-public-methods
"""Allow failing import when using it in the client mode, without `app` dependencies."""

Expand Down
1 change: 1 addition & 0 deletions nc_py_api/_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Exceptions for the Nextcloud API."""

from httpx import codes


Expand Down
1 change: 1 addition & 0 deletions nc_py_api/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

For internal use, prototypes can change between versions.
"""

import secrets
from base64 import b64decode
from datetime import datetime, timezone
Expand Down
1 change: 1 addition & 0 deletions nc_py_api/_preferences_ex.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nextcloud API for working with apps V2's storage w/wo user context(table oc_appconfig_ex/oc_preferences_ex)."""

import dataclasses
import typing

Expand Down
1 change: 1 addition & 0 deletions nc_py_api/_session.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Session represents one connection to Nextcloud. All related stuff for these live here."""

import typing
from abc import ABC, abstractmethod
from base64 import b64encode
Expand Down
1 change: 1 addition & 0 deletions nc_py_api/ex_app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""All possible ExApp stuff for NextcloudApp that can be used."""

from .defs import ApiScope, LogLvl
from .integration_fastapi import nc_app, set_handlers, talk_bot_app
from .misc import persistent_storage, verify_version
Expand Down
1 change: 1 addition & 0 deletions nc_py_api/ex_app/ui/files.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nextcloud API for working with drop-down file's menu."""

import os
import typing
from datetime import datetime, timezone
Expand Down
1 change: 1 addition & 0 deletions nc_py_api/ex_app/uvicorn_fastapi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Uvicorn wrappers to run the external application."""

import typing
from os import environ

Expand Down
1 change: 1 addition & 0 deletions nc_py_api/nextcloud.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nextcloud class providing access to all API endpoints."""

from abc import ABC
from typing import Optional, Union

Expand Down
1 change: 1 addition & 0 deletions nc_py_api/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Each setting only affects newly created instances of **Nextcloud**/**NextcloudApp** class, unless otherwise specified.
Specifying options in **kwargs** has higher priority than this.
"""

import typing
from os import environ

Expand Down
1 change: 1 addition & 0 deletions nc_py_api/talk_bot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nextcloud Talk API for bots."""

import dataclasses
import hashlib
import hmac
Expand Down