LibCST/libcst/codemod
Zsolt Dollenstein f5b7027a45
Add a codemod for dataclass changes in 3.11
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.
2024-12-07 21:31:40 +00:00
..
commands Add a codemod for dataclass changes in 3.11 2024-12-07 21:31:40 +00:00
tests fix certain matchers breaking under multiprocessing by initializing them late (#1204) 2024-09-25 11:29:54 +01:00
visitors Fix Literal parse error in RemoveImportsVisitor (#1130) 2024-05-03 22:36:20 +01:00
__init__.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
_cli.py Clear warnings for each file in comemod cli (#1184) 2024-08-05 22:41:51 +01:00
_codemod.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
_command.py Fix all type errors (#579) 2022-01-05 18:13:01 +00:00
_context.py Support module and package names in the codemod context (#662) 2022-03-23 14:17:25 -04:00
_dummy_pool.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
_runner.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
_testing.py Fix all type errors (#579) 2022-01-05 18:13:01 +00:00
_visitor.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00