mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
Python 3.11 changed the field default mutability check for dataclasses to only allow defaults which are hashable. This codemod helps with the migration by changing all default values that aren't obviously hashable to use `default_factory` instead. Note: it's impossible to accurately determine if a particular expression produces a hashable value in a codemod, so the codemod significantly over-approximates what's unhashable. |
||
|---|---|---|
| .. | ||
| commands | ||
| tests | ||
| visitors | ||
| __init__.py | ||
| _cli.py | ||
| _codemod.py | ||
| _command.py | ||
| _context.py | ||
| _dummy_pool.py | ||
| _runner.py | ||
| _testing.py | ||
| _visitor.py | ||