seladb / PcapPlusPlus

PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use. It provides C++ wrappers for the most popular packet processing engines such as libpcap, Npcap, WinPcap, DPDK, AF_XDP and PF_RING.
https://pcapplusplus.github.io/
The Unlicense
2.74k stars 672 forks source link

add Ruff for Python file format and lint #1584

Closed tigercosmos closed 1 month ago

tigercosmos commented 1 month ago

As discussed in https://github.com/seladb/PcapPlusPlus/issues/1562, use Ruff for Python file formatting and linting.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.88%. Comparing base (4417695) to head (ff50bee). Report is 1 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #1584 +/- ## ========================================== - Coverage 82.89% 82.88% -0.02% ========================================== Files 273 273 Lines 46205 46205 Branches 9274 9288 +14 ========================================== - Hits 38300 38295 -5 + Misses 7091 7049 -42 - Partials 814 861 +47 ``` | [Flag](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [fedora40](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.38% <ø> (+0.01%)` | :arrow_up: | | [macos-12](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `80.85% <ø> (-0.02%)` | :arrow_down: | | [macos-13](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `80.27% <ø> (+<0.01%)` | :arrow_up: | | [macos-14](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `80.20% <ø> (ø)` | | | [mingw32](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `70.20% <ø> (-0.03%)` | :arrow_down: | | [mingw64](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `70.17% <ø> (-0.03%)` | :arrow_down: | | [npcap](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `84.74% <ø> (-0.09%)` | :arrow_down: | | [rhel94](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.23% <ø> (-0.01%)` | :arrow_down: | | [ubuntu2004](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `57.78% <ø> (-0.04%)` | :arrow_down: | | [ubuntu2004-zstd](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `57.91% <ø> (+<0.01%)` | :arrow_up: | | [ubuntu2204](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.16% <ø> (-0.01%)` | :arrow_down: | | [ubuntu2204-icpx](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `58.32% <ø> (-0.04%)` | :arrow_down: | | [ubuntu2404](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.42% <ø> (-0.01%)` | :arrow_down: | | [unittest](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `82.88% <ø> (-0.02%)` | :arrow_down: | | [windows-2019](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `84.86% <ø> (-0.02%)` | :arrow_down: | | [windows-2022](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `84.86% <ø> (-0.02%)` | :arrow_down: | | [winpcap](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `84.83% <ø> (-0.02%)` | :arrow_down: | | [xdp](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1584/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `49.13% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tigercosmos commented 1 month ago

@seladb could you take a look?