Skip to content

Commit

Permalink
docs: click.Option intersphinx reference (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
eonu committed Dec 13, 2023
1 parent 3fafaa4 commit b1f0dcf
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion feud/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def env(**envs: str) -> t.Callable:
"""Specify environment variable inputs for command options.
Decorates a function by attaching command option environment variable
metadata, to be used at compile time by py:class:`click.Option` objects.
metadata, to be used at compile time by :py:class:`click.Option` objects.
Environment variables may only be defined for command-line options, not
arguments. This translates to keyword-only parameters, i.e. those
Expand Down
8 changes: 5 additions & 3 deletions tests/unit/test_internal/test_types/test_click/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@

from __future__ import annotations

import pytest
import typing as t

from .utils import annotate
import pytest


class Helpers:
annotate = annotate
@staticmethod
def annotate(hint: t.Any) -> t.Annotated[t.Any, "annotation"]:
return t.Annotated[hint, "annotation"]


@pytest.fixture(scope="module")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
from feud import typing as t
from feud.config import Config

from ..utils import annotate # noqa: TID252

def annotate(hint: t.Any) -> t.Annotated[t.Any, "annotation"]:
return t.Annotated[hint, "annotation"]


@pytest.mark.parametrize("annotated", [False, True])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
from feud._internal._types.click import Union
from feud.config import Config

from ..utils import annotate # noqa: TID252

def annotate(hint: t.Any) -> t.Annotated[t.Any, "annotation"]:
return t.Annotated[hint, "annotation"]


@pytest.mark.parametrize("annotated", [False, True])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

from feud._internal import _types

from .utils import annotate

def annotate(hint: t.Any) -> t.Annotated[t.Any, "annotation"]:
return t.Annotated[hint, "annotation"]


@pytest.fixture(scope="module")
Expand Down
10 changes: 0 additions & 10 deletions tests/unit/test_internal/test_types/test_click/utils.py

This file was deleted.

0 comments on commit b1f0dcf

Please sign in to comment.