Skip to content

New codemod to fix dataclass defaults#350

Merged
clavedeluna merged 6 commits intomainfrom
dataclass-defaults
Mar 11, 2024
Merged

New codemod to fix dataclass defaults#350
clavedeluna merged 6 commits intomainfrom
dataclass-defaults

Conversation

@clavedeluna
Copy link
Copy Markdown
Contributor

@clavedeluna clavedeluna commented Mar 10, 2024

Overview

This codemod will fix dataclass default values for list, dict, set, and replace it with the correct syntax

Description

  • I left some todos and a test for future enhancement to also fix when the default values are populated. I think the right way is to use lambda? Haven't fully researched

Closes #250

@clavedeluna clavedeluna marked this pull request as ready for review March 10, 2024 13:32
Copy link
Copy Markdown
Member

@drdavella drdavella left a comment

Choose a reason for hiding this comment

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

Really nice codemod overall, thanks! Just requesting an update on the description.

Comment thread src/core_codemods/docs/pixee_python_fix-dataclass-defaults.md Outdated
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@clavedeluna clavedeluna enabled auto-merge March 11, 2024 16:18
@clavedeluna clavedeluna dismissed drdavella’s stale review March 11, 2024 16:29

implemented wording change requested

@clavedeluna clavedeluna added this pull request to the merge queue Mar 11, 2024
Merged via the queue into main with commit 907b416 Mar 11, 2024
@clavedeluna clavedeluna deleted the dataclass-defaults branch March 11, 2024 16:38
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.

Fix dataclass defaults

3 participants