Repository: dry-python/returns (branch: dependabot/pip/anyio-4.2.0)
Commit date: 2023-12-18T16:19:52Z

Workflow file: .github/workflows/test.yml (test)
name: test

on:
  push:
    branches:
      - master
    paths-ignore:
      - 'docs/requirements.txt'
  pull_request:
    paths-ignore:
      - 'docs/requirements.txt'
  workflow_dispatch:

permissions:
  contents: read

concurrency:
  group: test-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    strategy:
      fail-fast: false
      matrix:
        python-version: ['3.8', '3.9', '3.10', '3.11']
        task: ['tests', 'typesafety']

    steps:
    - uses: actions/checkout@v4

    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}

    - name: Install poetry
      run: |
        curl -sSL "https://install.python-poetry.org" | python

        # Adding `poetry` to `$PATH`:
        echo "$HOME/.poetry/bin" >> $GITHUB_PATH

    - name: Set up cache
      uses: actions/cache@v3
      with:
        path: .venv
        key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
        restore-keys: |
          venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
          venv-${{ matrix.python-version }}-

    - name: Install dependencies
      run: |
        poetry config virtualenvs.in-project true
        poetry install --extras=compatible-mypy

        poetry run pip install -U pip

    - name: Run tests
      if: matrix.task == 'tests'
      run: |
        poetry run flake8 .

        # In order to make `exclude` option work, we need to separate the checks
        # of returns and its tests into two separated commands
        poetry run mypy --enable-error-code=unused-awaitable returns
        poetry run mypy tests

        # Different python versions are covered differently:
        poetry run pytest returns docs/pages tests

        poetry run doc8 -q docs
        poetry run codespell returns tests docs typesafety README.md CONTRIBUTING.md CHANGELOG.md

        poetry run poetry check
        poetry run pip check
        poetry run safety check --full-report
        poetry run python -m slotscheck returns --verbose

    - name: Run typesafety tests
      if: matrix.task == 'typesafety'
      run: |
        # We do this to speed up the build:
        poetry run pytest typesafety -p no:cov -o addopts="" --mypy-ini-file=setup.cfg

    - name: Upload coverage to Codecov
      if: "matrix.task == 'tests' && matrix.python-version == 3.11"
      uses: codecov/codecov-action@v3
      with:
        file: ./coverage.xml

env:
  PIP_INDEX_URL: http://localhost:8629/2023-12-18
  UV_INDEX_URL: http://localhost:8629/2023-12-18


Failed build logs:
step_name: build (3.8, tests)/7_Run tests.txt
log: ##[group]Run poetry run flake8 .
[36;1mpoetry run flake8 .[0m
[36;1m[0m
[36;1m# In order to make `exclude` option work, we need to separate the checks[0m
[36;1m# of returns and its tests into two separated commands[0m
[36;1mpoetry run mypy --enable-error-code=unused-awaitable returns[0m
[36;1mpoetry run mypy tests[0m
[36;1m[0m
[36;1m# Different python versions are covered differently:[0m
[36;1mpoetry run pytest returns docs/pages tests[0m
[36;1m[0m
[36;1mpoetry run doc8 -q docs[0m
[36;1mpoetry run codespell returns tests docs typesafety README.md CONTRIBUTING.md CHANGELOG.md[0m
[36;1m[0m
[36;1mpoetry run poetry check[0m
[36;1mpoetry run pip check[0m
[36;1mpoetry run safety check --full-report[0m
[36;1mpoetry run python -m slotscheck returns --verbose[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
##[endgroup]
Success: no issues found in 113 source files
tests/test_examples/test_context/test_reader_future_result.py:70: error: Argument 1 to "run" has incompatible type "Callable[[], Coroutine[Any, Any, IOResult[Sequence[str], Exception]]]"; expected "Callable[[VarArg(Any)], Awaitable[IOResult[Sequence[str], Exception]]]"  [arg-type]
Found 1 error in 1 file (checked 73 source files)
##[error]Process completed with exit code 1.

step_name: build (3.9, tests)/7_Run tests.txt
log: ##[group]Run poetry run flake8 .
[36;1mpoetry run flake8 .[0m
[36;1m[0m
[36;1m# In order to make `exclude` option work, we need to separate the checks[0m
[36;1m# of returns and its tests into two separated commands[0m
[36;1mpoetry run mypy --enable-error-code=unused-awaitable returns[0m
[36;1mpoetry run mypy tests[0m
[36;1m[0m
[36;1m# Different python versions are covered differently:[0m
[36;1mpoetry run pytest returns docs/pages tests[0m
[36;1m[0m
[36;1mpoetry run doc8 -q docs[0m
[36;1mpoetry run codespell returns tests docs typesafety README.md CONTRIBUTING.md CHANGELOG.md[0m
[36;1m[0m
[36;1mpoetry run poetry check[0m
[36;1mpoetry run pip check[0m
[36;1mpoetry run safety check --full-report[0m
[36;1mpoetry run python -m slotscheck returns --verbose[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
##[endgroup]
Success: no issues found in 113 source files
tests/test_examples/test_context/test_reader_future_result.py:70: error: Argument 1 to "run" has incompatible type "Callable[[], Coroutine[Any, Any, IOResult[Sequence[str], Exception]]]"; expected "Callable[[VarArg(Any)], Awaitable[IOResult[Sequence[str], Exception]]]"  [arg-type]
Found 1 error in 1 file (checked 73 source files)
##[error]Process completed with exit code 1.

step_name: build (3.10, tests)/7_Run tests.txt
log: ##[group]Run poetry run flake8 .
[36;1mpoetry run flake8 .[0m
[36;1m[0m
[36;1m# In order to make `exclude` option work, we need to separate the checks[0m
[36;1m# of returns and its tests into two separated commands[0m
[36;1mpoetry run mypy --enable-error-code=unused-awaitable returns[0m
[36;1mpoetry run mypy tests[0m
[36;1m[0m
[36;1m# Different python versions are covered differently:[0m
[36;1mpoetry run pytest returns docs/pages tests[0m
[36;1m[0m
[36;1mpoetry run doc8 -q docs[0m
[36;1mpoetry run codespell returns tests docs typesafety README.md CONTRIBUTING.md CHANGELOG.md[0m
[36;1m[0m
[36;1mpoetry run poetry check[0m
[36;1mpoetry run pip check[0m
[36;1mpoetry run safety check --full-report[0m
[36;1mpoetry run python -m slotscheck returns --verbose[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
##[endgroup]
Success: no issues found in 113 source files
tests/test_examples/test_context/test_reader_future_result.py:70: error: Argument 1 to "run" has incompatible type "Callable[[], Coroutine[Any, Any, IOResult[Sequence[str], Exception]]]"; expected "Callable[[VarArg(Any)], Awaitable[IOResult[Sequence[str], Exception]]]"  [arg-type]
Found 1 error in 1 file (checked 73 source files)
##[error]Process completed with exit code 1.

step_name: build (3.11, tests)/7_Run tests.txt
log: ##[group]Run poetry run flake8 .
[36;1mpoetry run flake8 .[0m
[36;1m[0m
[36;1m# In order to make `exclude` option work, we need to separate the checks[0m
[36;1m# of returns and its tests into two separated commands[0m
[36;1mpoetry run mypy --enable-error-code=unused-awaitable returns[0m
[36;1mpoetry run mypy tests[0m
[36;1m[0m
[36;1m# Different python versions are covered differently:[0m
[36;1mpoetry run pytest returns docs/pages tests[0m
[36;1m[0m
[36;1mpoetry run doc8 -q docs[0m
[36;1mpoetry run codespell returns tests docs typesafety README.md CONTRIBUTING.md CHANGELOG.md[0m
[36;1m[0m
[36;1mpoetry run poetry check[0m
[36;1mpoetry run pip check[0m
[36;1mpoetry run safety check --full-report[0m
[36;1mpoetry run python -m slotscheck returns --verbose[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.11.7/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.7/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.7/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.7/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.7/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.7/x64/lib
##[endgroup]
Success: no issues found in 113 source files
tests/test_examples/test_context/test_reader_future_result.py:70: error: Argument 1 to "run" has incompatible type "Callable[[], Coroutine[Any, Any, IOResult[Sequence[str], Exception]]]"; expected "Callable[[VarArg(Any)], Awaitable[IOResult[Sequence[str], Exception]]]"  [arg-type]
Found 1 error in 1 file (checked 73 source files)
##[error]Process completed with exit code 1.


Changed files:
tests/test_examples/test_context/test_reader_future_result.py

Fix diff:
diff --git a/tests/test_examples/test_context/test_reader_future_result.py b/tests/test_examples/test_context/test_reader_future_result.py
index f1ffdbb..9d474f7 100644
--- a/tests/test_examples/test_context/test_reader_future_result.py
+++ b/tests/test_examples/test_context/test_reader_future_result.py
@@ -67,7 +67,7 @@ if __name__ == '__main__':
     future_result = managed_httpx(
         FutureResultE.from_value(httpx.AsyncClient(timeout=5)),
     )
-    print(anyio.run(future_result.awaitable))  # noqa: WPS421
+    print(anyio.run(future_result.awaitable))  # type: ignore # noqa: WPS421
     # <IOResult: <Success: (
     #    'sunt aut facere repellat provident occaecati ...',
     #    'qui est esse',