Skip to content

feat(edge): show ↔ and → between the ends of an edge - #90

Merged
petercorke merged 3 commits into
mainfrom
feat/edge-unicode-arrows
Oct 31, 2026
Merged

petercorke merged 3 commits into
mainfrom
feat/edge-unicode-arrows

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Fixes #76.

Edge.__str__ (and so repr) now separates the ends with ↔ in an undirected graph and → in a directed one, instead of -- and ->.

  • The DOT exporter is unchanged: GraphViz requires -- and ->.
  • Tests compare the whole string, hand-written, for both directed and undirected, and for repr; the standalone-edge test likewise.
  • examples/roads.ipynb: the 29 saved Edge{...} output lines were edited to match, rather than re-executing the notebook.
  • versionchanged:: 1.1 in the docstring notes the one risk: output redirected to a file or pipe under a legacy Windows code page (cp1252) can raise UnicodeEncodeError; PYTHONUTF8=1 avoids it. The Windows console, terminals and notebooks are unaffected. No opt-out flag for now (str() cannot take an argument); a class attribute can be added if anyone hits this.
  • CHANGELOG entry to follow once the Unreleased section exists (feat: detect parallel edges in directed and undirected graphs #78).

mypy clean, 772 tests pass, docs build has the baseline 11 nitpicky warnings.

🤖 Generated with Claude Code

Edge.__str__ (and so repr) used "--" and "->".  Use ↔ for an undirected
edge and → for a directed one.  The DOT exporter is unchanged: GraphViz
needs ASCII.  The saved outputs in examples/roads.ipynb are updated.

Fixes #76

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codacy-production

codacy-production Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.05%. Comparing base (17b8470) to head (bd045d7).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #90   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files           4        4           
  Lines        1590     1590           
=======================================
  Hits         1559     1559           
  Misses         31       31           

☔ 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.

petercorke and others added 2 commits October 31, 2026 11:38
@petercorke
petercorke merged commit 754ca27 into main Oct 31, 2026
12 checks passed
@petercorke
petercorke deleted the feat/edge-unicode-arrows branch October 31, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unicode arrow characters

1 participant