nfstream / nfstream

NFStream: a Flexible Network Data Analysis Framework.
https://www.nfstream.org
GNU Lesser General Public License v3.0
1.06k stars 118 forks source link

Improve coding style #165

Open ssrtw opened 1 year ago

ssrtw commented 1 year ago

Improve coding style

Description

I have reformatted the Python code in this project using yapf, following Google's conventions and minimizing changes to the code as much as possible. Additionally, I have created a .git-blame-ignore-revs file to address the issue with git blame that was raised in PR #79.

If there are certain parts of your code that you do not want to be formatted, you can use # yapf: disable and # yapf: enable to wrap them. For example, I have disabled auto formatting for the __slots__ of NFlow. https://github.com/ssrtw/nfstream/blob/add-formatter/nfstream/flow.py#L113

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Using the tests.py script

Test Configuration:

Checklist: