Skip to content

Conversation

@cameronangliss
Copy link
Contributor

@cameronangliss cameronangliss commented Jan 14, 2026

Requires #822

It's nice to be able to serialize/deserialize objects so you can store them in files and save your current situation. Now you can do that with Battle and DoubleBattle objects! Battle-related objects no longer store a _data field containing GenData, and instead just call GenData.from_gen whenever they need the pokedex or something. This does not lose any performance and we were already doing this in some places, but allows these objects to be pickled now that they aren't carrying a pointer to the giant GenData object.

@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 90.62500% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.47%. Comparing base (f458350) to head (08b45dd).
⚠️ Report is 239 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #821      +/-   ##
==========================================
+ Coverage   83.38%   83.47%   +0.08%     
==========================================
  Files          39       47       +8     
  Lines        3918     5585    +1667     
==========================================
+ Hits         3267     4662    +1395     
- Misses        651      923     +272     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cameronangliss cameronangliss marked this pull request as ready for review January 14, 2026 11:29
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