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

serialization filter: any one expressen preferred #371

Closed
wants to merge 4 commits into from

Conversation

jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented Apr 3, 2023

fixes #365

implementation according to #365 (comment)

outpur is about to change,
so this is seen as a breaking change !

@jkowalleck jkowalleck added the bug Something isn't working label Apr 3, 2023
@jkowalleck jkowalleck requested a review from a team as a code owner April 3, 2023 17:10
@jkowalleck jkowalleck force-pushed the maybe-fix-issue365 branch from 1b5c134 to dc8d354 Compare April 3, 2023 17:13
@jkowalleck jkowalleck marked this pull request as draft April 3, 2023 17:13
@jkowalleck jkowalleck force-pushed the maybe-fix-issue365 branch from 733c55b to 087fd32 Compare June 15, 2023 11:25
@jkowalleck jkowalleck force-pushed the maybe-fix-issue365 branch from 087fd32 to 1d13eb9 Compare June 15, 2023 11:32
@jkowalleck jkowalleck force-pushed the maybe-fix-issue365 branch 3 times, most recently from f20fe65 to 0a40f1e Compare June 15, 2023 11:52
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
@jkowalleck jkowalleck force-pushed the maybe-fix-issue365 branch 2 times, most recently from 8c91688 to bd534ef Compare June 15, 2023 11:59
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
@jkowalleck jkowalleck force-pushed the maybe-fix-issue365 branch from bd534ef to 4cd9b5f Compare June 15, 2023 18:07
author='Test Author'
)


def get_component_setuptools_simple_no_version(bom_ref: Optional[str] = None) -> Component:
Copy link

Choose a reason for hiding this comment

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

8% of developers fix this issue

E302: expected 2 blank lines, found 1


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

product(_bom_getters, ['json'], [JsonV1Dot4, JsonV1Dot3, JsonV1Dot2]),
))
@unpack
def test_serialize(self, bom_getter: Callable[[], Bom], target: str, schema_type: Union[Type[Json], Type[Xml]]) -> None:
Copy link

Choose a reason for hiding this comment

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

6% of developers fix this issue

E501: line too long (124 > 120 characters)


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

@classmethod
def deserialize(cls, o: object) -> List[LicenseChoice]:
raise NotImplementedError
return [LicenseChoice.from_json(data) for data in o]
Copy link

Choose a reason for hiding this comment

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

32% of developers fix this issue

E1101: Class 'LicenseChoice' has no 'from_json' member


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

"""
bom_expression = get_bom_for_issue_365_expression()
bom_multi = get_bom_for_issue_365_multiple_licenses()
component_multi: Component = bom_multi.components[0]
Copy link

Choose a reason for hiding this comment

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

11% of developers fix this issue

reportGeneralTypeIssues: Argument of type "Literal[0]" cannot be assigned to parameter "index" of type "slice" in function "getitem"
  "Literal[0]" is incompatible with "slice"

❗❗ 3 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
tests/data.py 437
tests/data.py 438
tests/data.py 438

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

@classmethod
def deserialize(cls, o: object) -> List[LicenseChoice]:
raise NotImplementedError
return [LicenseChoice.from_json(data) for data in o]
Copy link

Choose a reason for hiding this comment

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

15% of developers fix this issue

vulture-100: unreachable code after 'raise'


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

@jkowalleck jkowalleck closed this Sep 25, 2023
@jkowalleck jkowalleck deleted the maybe-fix-issue365 branch December 10, 2023 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Schema-invalid serialized result when multiple licenses
1 participant