Skip to content

Conversation

goncalossilva
Copy link
Member

Migrates from attrs to dataclasses. Claude did most of the heavy lifting, with my supervision. :)

Beyond tests (memory and localstack), I leveraged ruff and mypy liberally for this.

@goncalossilva goncalossilva requested a review from Schnouki April 14, 2025 23:43
else:
kwargs = bind_arguments(self.processor, args, kwargs)
return self.processor(**kwargs)
return self.processor(**kwargs) # type:ignore[call-arg]
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to add this ignore even before making any changes. Running mypy failed with:

sqs_workers/async_task.py:65: error: Too few arguments  [call-arg]
sqs_workers/async_task.py:68: error: Too few arguments  [call-arg]
Found 2 errors in 1 file (checked 25 source files)

I did spent a couple of minutes trying to grasp the problem, but I couldn't. I'm not familiar with this codebase, so it may be more obvious to you. But if not, we can keep this for the time being. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

(same on line 65, it's the same problem)

@goncalossilva goncalossilva force-pushed the goncalossilva/migrate-to-dataclasses branch 2 times, most recently from d3478dc to 7d82091 Compare April 15, 2025 00:05
@goncalossilva goncalossilva force-pushed the goncalossilva/migrate-to-dataclasses branch from 7d82091 to 89983bd Compare April 15, 2025 00:06
@goncalossilva goncalossilva changed the title Update dependencies Migrate from attrs to dataclasses Apr 15, 2025
Copy link
Member

@proxi proxi left a comment

Choose a reason for hiding this comment

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

✅ Changes looks sane. There's not good way to test them other than updating in the parent project and testing there, which I did not do.

@goncalossilva
Copy link
Member Author

We have reasonable test coverage. :)

@goncalossilva
Copy link
Member Author

Thanks!

@goncalossilva goncalossilva merged commit 62ee415 into main Apr 15, 2025
12 checks passed
@goncalossilva goncalossilva deleted the goncalossilva/migrate-to-dataclasses branch April 15, 2025 15:05
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