Skip to content

docs: explain variable annotations in container example - #2603

Merged
sobolevn merged 1 commit into
dry-python:masterfrom
NginxL:docs/explain-result-annotations-1049
Dec 6, 2026
Merged

sobolevn merged 1 commit into
dry-python:masterfrom
NginxL:docs/explain-result-annotations-1049

Conversation

@NginxL

@NginxL NginxL commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • No unrelated changes.
  • New test case: not applicable; this is a documentation explanation around an existing tested example.
  • Documentation updated.
  • CHANGELOG.md updated.

Related issues

Refs #1049

Description

Explains the result: Result[int, Any] = ... syntax before the container example: it is a variable type annotation, not a runtime constructor or cast, and it may be omitted when inference is sufficient.

Checks

  • Extracted the changed Python doctest example and parsed it with ast.
  • git diff --check passed.

Gaps

  • The full doctest suite, Sphinx build, Ruff, and mypy were not run because project dependencies are unavailable in the sparse work environment and were not installed.
  • No runtime code changed.

AI disclosure

DSH AI coding agent assisted with locating the example and drafting the explanation and changelog entry. The contributor reviewed the final change and takes responsibility for it.

Assisted-by: DSH AI coding agent
@codspeed

codspeed Bot commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 note

ℹ️ 2 benchmarks have no flamegraph

The flamegraph wasn't generated: the symbols of the profiling trace could not be resolved, because no information about the language frames was collected.

See affected benchmarks

✅ 22 untouched benchmarks


Comparing NginxL:docs/explain-result-annotations-1049 (5300266) with master (8400260)

Open in CodSpeed

@sobolevn
sobolevn marked this pull request as ready for review December 6, 2026 19:45
@sobolevn
sobolevn merged commit 1bd5df4 into dry-python:master Dec 6, 2026
25 checks passed
@codecov

codecov Bot commented Dec 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (82ef3ef) to head (5300266).
⚠️ Report is 690 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master     #2603    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           80        82     +2     
  Lines         2485      2700   +215     
  Branches       437        45   -392     
==========================================
+ Hits          2485      2700   +215     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants