Comments (5)
Does --mypy-pyproject-toml-file
not work for you?
from pytest-mypy-plugins.
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.
Oh, I see :)
PR is welcome!
from pytest-mypy-plugins.
Great, thanks! I'll work on it.
from pytest-mypy-plugins.
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)
- Test failures using Python 3.11 and Mypy 0.981 HOT 4
- greater-than sign in parametrized values (to check function return values)
- Fails in Python 3.12 due to usage of pkg_resources HOT 3
- sdist is missing tests HOT 5
- chevron is not maintained
- Allow parametrizing `mypy_config`
- Support `--mypy-extra-options` CLI flag
- How to solve Python 3.8/3.9 changes in typing representation HOT 4
- Is there a way to mark `xfail` tests, also with matching output?
- "FileNotFoundError" due to missing "schema.json" after installation
- Ignore mypy errors from site-packages imports HOT 3
- Adjust test-mypy-config.yml to test with more stable mypy options HOT 1
- Allow custom properties in our json schema HOT 1
- New deprecation warning with pytest 8.1 (YamlTestFile not using a cooperative constructor) HOT 2
- Testing changes and caching behaviour HOT 5
- [tool.mypy.overrides] sections are dropped from config
- Using `assert_type` together with `pytest-mypy-plugins`
- Support for older pytest HOT 6
- test failures are really really difficult to read HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-mypy-plugins.