• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

manahl / PyBloqs / 7a4aae92-f0aa-4775-91aa-8745174ad27d
89%
master: 89%

Build:
Build:
LAST BUILD BRANCH: fix/pandas3-table-formatters
DEFAULT BRANCH: master
Ran 31 Aug 2026 12:56PM UTC
Jobs 2
Files 38
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Aug 2026 12:53PM UTC coverage: 88.607% (-0.2%) from 88.791%
7a4aae92-f0aa-4775-91aa-8745174ad27d

Pull #176

circleci

WatchTree-19
fix: plot_format leaks its settings when the wrapped block raises

plot_format mutates module-level state and restores it after the yield with no
try/finally:

    old = get_plot_format()
    set_plot_format(plot_format, dpi)
    yield
    set_plot_format(*old)

If the wrapped code raises, which rendering readily does, the restore never
runs and _PLOT_FORMAT, _PLOT_MIME_TYPE and _PLOT_DPI stay overridden for the
rest of the process. Nothing warns; every later block silently renders at the
wrong format and DPI. Against released 1.4.3, a block that raises inside
plot_format("svg", 300) leaves the globals at ('svg', 300).

Wrap the yield in try/finally.

Separately, set_plot_format assigns _PLOT_FORMAT before looking up the mime
type, so an unsupported format raises KeyError with _PLOT_FORMAT already
changed and _PLOT_MIME_TYPE still holding the old value. On 1.4.3,
set_plot_format("jpeg") leaves format 'jpeg' paired with mime 'png'. Look the
mime type up first so a bad format changes nothing.

Adds two tests alongside the existing test_plot_format_ctx_manager, which only
covers the success path.

Signed-Off By Sandeep Singh Rai sandeeprai_dsp@hotmail.com
Pull Request #176: fix: plot_format leaks its settings when the wrapped block raises

5 of 5 new or added lines in 1 file covered. (100.0%)

2512 of 2835 relevant lines covered (88.61%)

1.77 hits per line

Jobs
ID Job ID Ran Files Coverage
1 7a4aae92-f0aa-4775-91aa-8745174ad27d.1 31 Aug 2026 12:56PM UTC 38
88.61
CircleCI Job
2 7a4aae92-f0aa-4775-91aa-8745174ad27d.2 31 Aug 2026 12:56PM UTC 38
88.6
CircleCI Job
Source Files on build 7a4aae92-f0aa-4775-91aa-8745174ad27d
  • Tree
  • List 38
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • CircleCI Build #7A4AAE92...
  • Pull Request #176
  • PR Base - master (#A81479AA...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc