Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve coding style #165

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Improve coding style #165

wants to merge 3 commits into from

Conversation

ssrtw
Copy link
Contributor

@ssrtw ssrtw commented Mar 4, 2023

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Using the tests.py script

Test Configuration:

  • OS version: Linux 5.19.0-32-generic 22.04.1-Ubuntu x86_64
  • Python version: 3.11.2
  • Hardware:
    • CPU: Intel i7-13700kf
    • RAM: DDR4-32GB-3200

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

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.

None yet

1 participant