From 78b255aa00a748b965a00ff5407e0342d3cc03ba Mon Sep 17 00:00:00 2001 From: Daniil Fajnberg Date: Fri, 10 Mar 2023 17:41:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Fix=20linter=20errors/warnings;?= =?UTF-8?q?=20adjust=20`ruff`=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 5 +++++ src/marshmallow_generic/__init__.py | 5 ++++- src/marshmallow_generic/decorators.py | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c1b750e..9086c39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,9 +119,14 @@ ignore = [ "E501", # Line too long -> handled by black "D203", # 1 blank line required before class docstring -> D211 is better "D212", # Multi-line docstring summary should start at the first line -> ugly, D212 is better + "D401", # First line of docstring should be in imperative mood -> no, it shouldn't ] [tool.ruff.per-file-ignores] +"src/**/__init__.py" = [ + "D104", # Missing docstring in public package + "F401", # {...} imported but unused +] "tests/*.py" = [ "D100", # Missing docstring in public module "D101", # Missing docstring in public class diff --git a/src/marshmallow_generic/__init__.py b/src/marshmallow_generic/__init__.py index 19df9b3..42775d2 100644 --- a/src/marshmallow_generic/__init__.py +++ b/src/marshmallow_generic/__init__.py @@ -16,5 +16,8 @@ limitations under the License.""" __version__ = "0.0.1" __doc__ = """ -PLACEHOLDER +Generic schema with full typing support and minimal boilerplate. """ + +from .decorators import post_load +from .schema import GenericSchema diff --git a/src/marshmallow_generic/decorators.py b/src/marshmallow_generic/decorators.py index a33e7d5..9d672a5 100644 --- a/src/marshmallow_generic/decorators.py +++ b/src/marshmallow_generic/decorators.py @@ -1,3 +1,5 @@ +"""Typed overloads for some of the `marshmallow.decorators` module.""" + from collections.abc import Callable from typing import Any, Optional, TypeVar, overload from typing_extensions import ParamSpec