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

Clean up technical debt #123

Merged
merged 7 commits into from
Apr 2, 2024
Merged

Conversation

pebenito
Copy link
Member

@pebenito pebenito commented Apr 2, 2024

Various cleanups and code quality improvements:

  • Convert format strings to f-strings.
  • Extensively add type annotations.
  • Update existing type annotations to use Python 3.0 style, e.g. Union[A,B] -> A | B
  • Remove tuple compat from sediff dataclasses, update sediff accordingly.
  • Remove most variable reuse in sediff.
  • Improve descriptors in diff classes

pebenito added 7 commits April 2, 2024 15:36
Thoroughly go through the entire setools package and add type annotations.

Signed-off-by: Chris PeBenito <[email protected]>
The variable reuse makes typing very messy. Remove most reuses to clean it up.

Signed-off-by: Chris PeBenito <[email protected]>
The lookup is unnecessary, since these calls are static.

Signed-off-by: Chris PeBenito <[email protected]>
Don't indirectly specify the function by name.

Signed-off-by: Chris PeBenito <[email protected]>
@pebenito pebenito merged commit 4c205e4 into SELinuxProject:main Apr 2, 2024
9 checks passed
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.

1 participant