From 3f3ad42acdb494d367935d360815c741afd0466e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Tue, 21 May 2024 02:50:37 +0200 Subject: [PATCH] Update dependencies --- .pre-commit-config.yaml | 13 +++---------- app/routers/static.py | 4 +++- poetry.lock | 14 +++++++------- pyproject.toml | 3 ++- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e5ddd19..006c9f3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,6 @@ default_language_version: python: python3.12 repos: - # Apply a consistent format to pyproject.toml files. - # https://pyproject-fmt.readthedocs.io/en/latest/ - - repo: https://github.com/tox-dev/pyproject-fmt - rev: "1.7.0" - hooks: - - id: pyproject-fmt - # Automatically add trailing commas to calls and literals. - repo: https://github.com/asottile/add-trailing-comma rev: v3.1.0 @@ -16,7 +9,7 @@ repos: # Some out-of-the-box hooks for pre-commit. - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-ast @@ -46,7 +39,7 @@ repos: # An extremely fast Python linter and formatter. - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.4 + rev: v0.4.4 hooks: - id: ruff-format - id: ruff @@ -54,6 +47,6 @@ repos: # Static checker for GitHub Actions workflow files. - repo: https://github.com/rhysd/actionlint - rev: v1.6.27 + rev: v1.7.0 hooks: - id: actionlint diff --git a/app/routers/static.py b/app/routers/static.py index 7eb91f7..943159b 100644 --- a/app/routers/static.py +++ b/app/routers/static.py @@ -4,7 +4,7 @@ import logging import os import time from pathlib import Path -from typing import TYPE_CHECKING, Iterable +from typing import TYPE_CHECKING from fastapi import APIRouter, File, Request, UploadFile from fastapi.responses import FileResponse @@ -14,6 +14,8 @@ from app.dependencies import CommonReader, CommonStats # noqa: TCH001 from app.settings import MEDIA_ROOT if TYPE_CHECKING: + from collections.abc import Iterable + from fastapi.datastructures import Address from reader import Feed from reader.types import Entry, EntrySearchResult diff --git a/poetry.lock b/poetry.lock index 3a69b02..db4de90 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "annotated-types" -version = "0.6.0" +version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" files = [ - {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, - {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] [[package]] @@ -1146,13 +1146,13 @@ files = [ [[package]] name = "requests" -version = "2.31.0" +version = "2.32.1" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.1-py3-none-any.whl", hash = "sha256:21ac9465cdf8c1650fe1ecde8a71669a93d4e6f147550483a2967d08396a56a5"}, + {file = "requests-2.32.1.tar.gz", hash = "sha256:eb97e87e64c79e64e5b8ac75cee9dd1f97f49e289b083ee6be96268930725685"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index 3349aa5..1b9988a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,10 +33,11 @@ lint.ignore = [ "ANN201", # Checks that public functions and methods have return type annotations. "ARG001", # Checks for the presence of unused arguments in function definitions. "B008", # Checks for function calls in default function arguments. - "D100", # Checks for undocumented public module definitions. "CPY001", # Checks for the absence of copyright notices within Python files. + "D100", # Checks for undocumented public module definitions. "D104", # Checks for undocumented public package definitions. "FIX002", # Checks for "TODO" comments. + "RUF029", # Checks for functions declared async that do not await or otherwise use features requiring the function to be declared async. ] [tool.ruff.lint.pydocstyle]