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

Fix inconsistent duplicate field mappings in various plugins #990

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JSCU-CNI
Copy link
Contributor

This PR is part of an ongoing effort to fix inconsistencies in record field types across dissect.

@Horofic Horofic self-requested a review January 15, 2025 09:58
@Horofic Horofic self-assigned this Jan 15, 2025
@JSCU-CNI JSCU-CNI force-pushed the fix/inconsistent-field-mappings branch from 99cf36f to 6c619b1 Compare January 20, 2025 11:35
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 73.07692% with 7 lines in your changes missing coverage. Please review.

Project coverage is 77.76%. Comparing base (a8a085c) to head (6c619b1).

Files with missing lines Patch % Lines
dissect/target/plugins/os/unix/shadow.py 73.07% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #990      +/-   ##
==========================================
- Coverage   77.76%   77.76%   -0.01%     
==========================================
  Files         327      327              
  Lines       28627    28653      +26     
==========================================
+ Hits        22261    22281      +20     
- Misses       6366     6372       +6     
Flag Coverage Δ
unittests 77.76% <73.07%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

assert results[3].name == "no_int_fields"
assert results[3].last_change is None
assert (
"Unable to parse last_change shadow value in /etc/shadow: invalid literal for int() with base 10: 'string' ('string')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Unable to parse last_change shadow value in /etc/shadow: invalid literal for int() with base 10: 'string' ('string')"
"Unable to parse last_change shadow value in /etc/shadow: invalid literal for int() with base 10: 'string' ('string')" # noqa:E501

@@ -69,6 +69,7 @@ def create_record(
create: str,
target: Target,
) -> TargetRecordDescriptor:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Black trips over this line during the linting check.

Suggested change

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.

2 participants