Code Monkey home page Code Monkey logo

Comments (5)

sobolevn avatar sobolevn commented on August 25, 2024

Does --mypy-pyproject-toml-file not work for you?

from pytest-mypy-plugins.

Delgan avatar Delgan commented on August 25, 2024

The problem would remain the same. Sorry if my description of the issue is not clear.
It's not about using mypy.ini or pyproject.toml, that's not really relevant here.

To put it more simply, I would like to configure pytest-mypy-plugins itself through pyproject.toml instead of using command-line options.

This would prevent tests from passing or failing depending on the current working directory, due to the way relative paths are resolved for --mypy-pyproject-toml-file and --mypy-ini-file.

from pytest-mypy-plugins.

sobolevn avatar sobolevn commented on August 25, 2024

Oh, I see :)
PR is welcome!

from pytest-mypy-plugins.

Delgan avatar Delgan commented on August 25, 2024

Great, thanks! I'll work on it.

from pytest-mypy-plugins.

Tinche avatar Tinche commented on August 25, 2024

Nice! I'm in the process of adding this plugin to the cattrs test suite and I think I want this.

To explain my use case: I want to run Mypy only on a single version of Python, say the latest. It's good enough and keeps complexity down. But I need to use --mypy-only-local-stub.

So my plan was to install the plugin only on 3.12 and put --mypy-only-local-stub into pyproject.toml/[tool.pytest.ini_options].addopts. But if I do that, on other Pythons pytest doesn't know what that argument is and won't run.

I'm sure there are other ways of solving this but this seemed like the simplest/most correct to me.

from pytest-mypy-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.