docs(specifiers): add is_unsatisfiable() usage example#1166
docs(specifiers): add is_unsatisfiable() usage example#1166
Conversation
|
@notatallshaw does this look fine, or would you like something else? I could see something like |
|
Yeah, I would expect people would be compounding specifiers, for whatever reason. We should encourage |
|
Added a compound |
Per review feedback from @henryiii and @notatallshaw, adds a compound example using the & operator to show how combining two SpecifierSets can produce an unsatisfiable set — closer to how users actually build specifiers from requires-python plus other constraints.
3b093d9 to
979f2fe
Compare
Fixes #1165
PR #1119 added
SpecifierSet.is_unsatisfiable()but the usage examples indocs/specifiers.rstdon't demonstrate it. Users scanning the Usage section have no way to discover this method without reading the full API reference.Added a doctest example showing
is_unsatisfiable()on both an unsatisfiable set (>=2.0,<1.0→True) and a satisfiable one (>=1.0,<2.0→False), placed after the existingfilter()example.