openml / openml/server-api

Ignored mypy error when using hypothesis

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dev-tools
Dominant language
Python
Stars
16
Forks
50
PR merge metrics
No merged PRs in 30d

Description

The following mypy error arises when running pre-commit run mypy --files tests/routers/v1/datasets_list_datasets_test.py.

tests/routers/v1/datasets_list_datasets_test.py:241: error: Untyped decorator makes function "test_list_data_identical" untyped  [misc]

but it doesn't happen in a fresh environment when installing the dependencies and running mypy directly, only when running through pre-commit. I already enforced the installation of hypothesis as a dependency and the use of python 3.12, but neither resolved the issue.

The most closely related issue I could find is https://github.com/HypothesisWorks/hypothesis/issues/2917 which suggests this problem would have been solved years ago.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the error with pre-commit run mypy --files tests/routers/v1/datasets_list_datasets_test.py and compare it with running mypy directly in a fresh environment. Start at tests/routers/v1/datasets_list_datasets_test.py:241; done means the pre-commit check no longer reports the untyped Hypothesis decorator error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.