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.73k stars 672 forks source link

Apply Ruff for Python Code #1562

Closed tigercosmos closed 1 month ago

tigercosmos commented 2 months ago

Ruff is the fastest linter and formatter written in Rust for the Python code. Since we already introduce clang-format in the project for the C++ part, the next step is to start formatting and lintting on the Python side.

seladb commented 2 months ago

@tigercosmos do you suggest we use it instead of Black as a formatter or just for linting?

tigercosmos commented 2 months ago

@seladb Ruff functions as both a formatter and a linter, and I chose it because it appears to be the fastest option. However, I'm open to discussing which tool we should use.

tigercosmos commented 2 months ago

@Dimi1010 @egecetin @clementperon please also share your opinions

Dimi1010 commented 2 months ago

I don't have a strong opinion, so I am fine with either.

egecetin commented 2 months ago

I'm also fine with all options since the python code base is just for testing and really short in terms of line

seladb commented 2 months ago

I'm also okay with using it for both. It's a lot faster than Black / Pylint but we'll probably not notice it because our Python code base is very small

tigercosmos commented 2 months ago

Okay, all of us are fine with either tool. I will try to use Ruff first. :)

seladb commented 1 month ago

@tigercosmos can we close this issue?