Skip to content

Add Config.load_yaml_string()#707

Merged
patkan merged 11 commits into
python-escpos:masterfrom
Elias0419:add-load-yaml-string
Jul 27, 2026
Merged

Add Config.load_yaml_string()#707
patkan merged 11 commits into
python-escpos:masterfrom
Elias0419:add-load-yaml-string

Conversation

@Elias0419

Copy link
Copy Markdown
Contributor

Description

Add a new method Config.load_yaml_string() to allow loading configuration directly from a YAML string.

@belono

belono commented Sep 13, 2025

Copy link
Copy Markdown
Contributor

Hi @Elias0419, and thanks for your contribution.

I like this feature and I'm glad you included tests with it.

The code looks good, although I'd like to make a few suggestions.

@belono belono left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's all for now.

Feel free to discuss any of my suggestions if you disagree or if I haven't expressed my point well 👌

Comment thread src/escpos/config.py
Comment thread src/escpos/config.py Outdated
Comment thread src/escpos/config.py Outdated
Comment thread src/escpos/config.py Outdated
Comment thread src/escpos/config.py Outdated
Comment thread test/test_config.py
Comment thread src/escpos/config.py Outdated

@belono belono left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been a pleasure @Elias0419 .

Very good job!! 🥇

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.70%. Comparing base (5b8a885) to head (1e0b84a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #707      +/-   ##
==========================================
+ Coverage   81.27%   81.70%   +0.43%     
==========================================
  Files          21       21              
  Lines        1693     1700       +7     
  Branches      267      266       -1     
==========================================
+ Hits         1376     1389      +13     
+ Misses        235      231       -4     
+ Partials       82       80       -2     
Flag Coverage Δ
unittests 81.64% <100.00%> (+0.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/escpos/config.py 91.07% <100.00%> (+7.39%) ⬆️

... and 1 file with indirect coverage changes

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

@patkan
patkan merged commit a6ce40c into python-escpos:master Jul 27, 2026
15 checks passed
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.

3 participants