Comments (9)
I can confirm the latest release of Cloup v2.1.2 is addressing this issue.
Thanks again @janluke for the fast release!
from cloup.
Thanks for reporting. I fixed it but I'm having issues with mypy.
from cloup.
Thanks for reporting. I fixed it but I'm having issues with mypy.
Thanks @janluke for the quick update! You're fast!
As for Mypy I guess you shouldn't try to be too perfect. You're better than me at types, but you have to realize the typing you're doing in Cloup is quite advanced. Click itself has some difficulties with typing the latest 8.1.4 release. See: pallets/click#2558
What I wanted to say: it is OK for me to have a couple of # type: ignore[]
in the code if it makes your life easier as a maintainer. You'll have time to revisit these issues and perfect it in next releases.
from cloup.
Ah, and see @davidism comment about being reasonable with typing in Click:
Also, note that typing in Python is optional. Click is not broken by this, 8.1.4 works just fine and fixes a lot of issues. You have the power to ignore any typing errors that are not useful, either inline, per file, or across a project if you need to get CI to pass. It's ok, you're not suddenly going to write the decorator wrong 😉.
from cloup.
I've always considered typing (and good IDE autocompletion) a feature of Cloup. If I use cloup.group
, then I expect my IDE knows I can call section()
. Unfortunately, Click is not designed with typing in mind.
from cloup.
Actually, even master
fails mypy checks now: https://github.com/janluke/cloup/actions/runs/5542413108/jobs/10117062431
from cloup.
Actually, even
master
fails mypy checks now: https://github.com/janluke/cloup/actions/runs/5542413108/jobs/10117062431
Yeah probably because of click==8.1.4
.
To catch regression as fast as possible and reduce the maintenance overhead, I:
- Run tests every week
- Test against Click
8.1.x
branch andmain
(i.e. the upcoming8.2.x
branch) - Test against Cloup stable and
master
release
That way I can fix or report issues quickly, before they compounds.
from cloup.
I checked the click issue only a few minutes ago, I hadn't understood that click 8.1.4 was the cause of the issue. So, I'll fix this issue when I have time, maybe after work today.
Yes, I'll add weekly tests as well.
from cloup.
I think your issues are being addressed by Click 8.1.5
which was released 40 minutes ago.
from cloup.
Related Issues (20)
- Minor language issue in documentation HOT 3
- Optional parenthesis for `@command` and `@option` HOT 5
- Require one constraint prevents subcommand help from working HOT 5
- Consider renaming __constraints to __cloup_constraints__ HOT 4
- Test for Python 3.11
- Pytest: replace deprecated `pytest.warns(None)` with something else
- Rename `sorted` attribute of `Section` to `is_sorted` to solve conflict with `Section.sorted` static method HOT 6
- Use ruff and a code formatter HOT 1
- mutually_exclusive constraint doesn't work with multiple flags with flag_value HOT 1
- Styling of aliases HOT 1
- Custom MultiCommands (with styling) HOT 3
- Over-highlighting of heading's extra space HOT 2
- Change `HelpTheme` type to allow sub-classing HOT 3
- Exception when creating copy of `Option` object with `Constraint` HOT 5
- Consider adding support to async commands
- Aliases not added if `Group` is initialized with a list of commands HOT 2
- Overwrite `to_info_dict()` method in `Context` and command classes HOT 3
- Drop support for python 3.7, add it for 3.12
- `cloup.Color` cannot be rendered by Sphinx: `Exception: you can't set attributes on this class` HOT 3
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 cloup.