hugovk / norwegianblue

CLI to show end-of-life dates for a number of products.
https://endoflife.date
MIT License
79 stars 4 forks source link

Add [Y/n] prompt to suggestion #143

Closed hugovk closed 1 year ago

hugovk commented 1 year ago

Fixes https://github.com/hugovk/norwegianblue/issues/133.

Before

$ eol pythn
Product 'pythn' not found, run 'eol all' for list. Did you mean: 'python'?

After

$ eol pythn
Product 'pythn' not found, run 'eol all' for list. Did you mean: 'python'? [Y/n] n
$ eol pythn
Product 'pythn' not found, run 'eol all' for list. Did you mean: 'python'? [Y/n] y
┌───────┬────────────┬─────────┬────────────────┬────────────┐
│ cycle │  release   │  latest │ latest release │    eol     │
├───────┼────────────┼─────────┼────────────────┼────────────┤
│  3.11 │ 2022-10-24 │  3.11.2 │   2023-02-07   │ 2027-10-24 │
│  3.10 │ 2021-10-04 │ 3.10.10 │   2023-02-07   │ 2026-10-04 │
│  3.9  │ 2020-10-05 │  3.9.16 │   2022-12-06   │ 2025-10-05 │
│  3.8  │ 2019-10-14 │  3.8.16 │   2022-12-06   │ 2024-10-14 │
│  3.7  │ 2018-06-26 │  3.7.16 │   2022-12-06   │ 2023-06-27 │
│  3.6  │ 2016-12-22 │  3.6.15 │   2021-09-03   │ 2021-12-23 │
│  3.5  │ 2015-09-12 │  3.5.10 │   2020-09-05   │ 2020-09-13 │
│  3.4  │ 2014-03-15 │  3.4.10 │   2019-03-18   │ 2019-03-18 │
│  3.3  │ 2012-09-29 │  3.3.7  │   2017-09-19   │ 2017-09-29 │
│  2.7  │ 2010-07-03 │  2.7.18 │   2020-04-19   │ 2020-01-01 │
│  2.6  │ 2008-10-01 │  2.6.9  │   2013-10-29   │ 2013-10-29 │
└───────┴────────────┴─────────┴────────────────┴────────────┘

$ eol pythn
Product 'pythn' not found, run 'eol all' for list. Did you mean: 'python'? [Y/n]
┌───────┬────────────┬─────────┬────────────────┬────────────┐
│ cycle │  release   │  latest │ latest release │    eol     │
├───────┼────────────┼─────────┼────────────────┼────────────┤
│  3.11 │ 2022-10-24 │  3.11.2 │   2023-02-07   │ 2027-10-24 │
│  3.10 │ 2021-10-04 │ 3.10.10 │   2023-02-07   │ 2026-10-04 │
│  3.9  │ 2020-10-05 │  3.9.16 │   2022-12-06   │ 2025-10-05 │
│  3.8  │ 2019-10-14 │  3.8.16 │   2022-12-06   │ 2024-10-14 │
│  3.7  │ 2018-06-26 │  3.7.16 │   2022-12-06   │ 2023-06-27 │
│  3.6  │ 2016-12-22 │  3.6.15 │   2021-09-03   │ 2021-12-23 │
│  3.5  │ 2015-09-12 │  3.5.10 │   2020-09-05   │ 2020-09-13 │
│  3.4  │ 2014-03-15 │  3.4.10 │   2019-03-18   │ 2019-03-18 │
│  3.3  │ 2012-09-29 │  3.3.7  │   2017-09-19   │ 2017-09-29 │
│  2.7  │ 2010-07-03 │  2.7.18 │   2020-04-19   │ 2020-01-01 │
│  2.6  │ 2008-10-01 │  2.6.9  │   2013-10-29   │ 2013-10-29 │
└───────┴────────────┴─────────┴────────────────┴────────────┘
codecov[bot] commented 1 year ago

Codecov Report

Merging #143 (5c201ee) into main (5321b42) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
+ Coverage   98.96%   98.99%   +0.03%     
==========================================
  Files           7        7              
  Lines         387      399      +12     
==========================================
+ Hits          383      395      +12     
  Misses          4        4              
Flag Coverage Δ
macos-latest 98.99% <100.00%> (+0.03%) :arrow_up:
ubuntu-latest 98.99% <100.00%> (+0.03%) :arrow_up:
windows-latest 98.99% <100.00%> (+0.03%) :arrow_up:

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

Impacted Files Coverage Δ
src/norwegianblue/__init__.py 98.75% <100.00%> (+0.10%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more