From 1ea48738d71fa960f8823a6939646c100b2dacce Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 20 Apr 2021 16:52:22 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20kwargs=20docstring=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/src/bxpkg/configure.py | 35 +++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/builder/src/bxpkg/configure.py b/builder/src/bxpkg/configure.py index 65fa3fd..8f9c217 100644 --- a/builder/src/bxpkg/configure.py +++ b/builder/src/bxpkg/configure.py @@ -1,10 +1,11 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from typing import Any, Dict, Tuple, TypeVar +from pathlib import Path +from typing import Any, Dict, Tuple, TypeVar, Union -from clickgen.util import PNGProvider from bxpkg.constants import WIN_CURSORS_CFG, WIN_DELAY, X_CURSORS_CFG, X_DELAY +from clickgen.util import PNGProvider X = TypeVar("X") @@ -13,28 +14,32 @@ def to_tuple(x: X) -> Tuple[X, X]: return (x, x) -def get_config(bitmaps_dir, **kwargs) -> Dict[str, Any]: +def get_config(bitmaps_dir: Union[str, Path], **kwargs) -> Dict[str, Any]: """Return configuration of `BreezeX` pointers. - :param bitmaps_dir: Path to .png file's directory. - :type bitmaps_dir: Union[str, Path] + :type bitmaps_dir: ``str`` or ``pathlib.Path`` - :param \**kwargs: - See below + :param **kwargs: + See below - :Keyword Arguments: - * *x_sizes* (``List[int]``) -- - List of pixel-sizes for xcursors. - * *win_canvas_size* (``int``) -- - Windows cursor's canvas pixel-size. - * *win_size* (``int``) -- - Pixel-size for Windows cursor. + :Keyword Arguments: + * *x_sizes* (``List[int]``) -- + List of pixel-sizes for xcursors. + * *win_canvas_size* (``int``) -- + Windows cursor's canvas pixel-size. + * *win_size* (``int``) -- + Pixel-size for Windows cursor. Example: ```python - get_config("./bitmaps", x_sizes=[24, 32], win_canvas_size=32, win_size=24) + get_config( + bitmaps_dir="./bitmaps", + x_sizes=[24, 28, 32], + win_canvas_size=32, + win_size=24, + ) ``` """