attrs/tests
Filipe Brandenburger e21793e90a
Allow converter.optional to take a Converter such as converter.pipe as its argument (#1372)
* Allow converter.optional to take a converter such as converter.pipe as its argument

* Only turn optional into a Converter if needed

* Move call to Converter constructor to the end of optional()

The constructor consumes __annotations__, so move the constructor call to after those have been set on the optional_converter function

* Update tests/test_converters.py

* Update tests/test_converters.py

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2024-11-17 11:15:26 +00:00
..
__init__.py Apply SPDX IDs 2021-12-27 09:29:09 +01:00
attr_import_star.py Tighten linting (#1175) 2023-08-20 12:03:53 +02:00
dataclass_transform_example.py Unpin/fix Pyright (#1302) 2024-07-13 12:01:09 +02:00
strategies.py Black dropped us 5 years ago 2024-09-05 09:02:00 +02:00
test_3rd_party.py Restore basic functionality on 3.14[sic] (#1329) 2024-08-06 13:37:35 +02:00
test_abc.py docs: style improvements 2024-03-16 16:22:58 +01:00
test_annotations.py Restore basic functionality on 3.14[sic] (#1329) 2024-08-06 13:37:35 +02:00
test_cmp.py Fix test_ne in test_cmp.py for Python 3.13 (#1255) 2024-03-07 09:23:46 +00:00
test_compat.py Drop Python 3.7 (#1340) 2024-08-29 17:35:04 +02:00
test_config.py Black dropped us 5 years ago 2024-09-05 09:02:00 +02:00
test_converters.py Allow converter.optional to take a Converter such as converter.pipe as its argument (#1372) 2024-11-17 11:15:26 +00:00
test_dunders.py Black dropped us 5 years ago 2024-09-05 09:02:00 +02:00
test_filters.py Black dropped us 5 years ago 2024-09-05 09:02:00 +02:00
test_funcs.py evolve: remove support for passing instances per kw (#1264) 2024-03-16 18:23:17 +00:00
test_functional.py Deprecate hash for unsafe_hash (#1323) 2024-08-03 15:19:21 +02:00
test_hooks.py Tighten linting (#1175) 2023-08-20 12:03:53 +02:00
test_import.py Drop Python 2.7 (#936) 2022-03-21 08:47:47 +01:00
test_init_subclass.py Demonstrate init subclass workaround 2023-06-27 07:12:37 +02:00
test_make.py Black dropped us 5 years ago 2024-09-05 09:02:00 +02:00
test_mypy.yml converters: allow wrapping and passing self and fields (#1267) 2024-07-28 13:55:24 +00:00
test_next_gen.py allow __suppress_context__ and __notes__ to be mutated on frozen exceptions (#1365) 2024-10-26 11:20:44 +00:00
test_packaging.py Drop Python 3.7 (#1340) 2024-08-29 17:35:04 +02:00
test_pattern_matching.py Black dropped us 5 years ago 2024-09-05 09:02:00 +02:00
test_pyright.py Unpin/fix Pyright (#1302) 2024-07-13 12:01:09 +02:00
test_setattr.py Make Converter a kind of adapter, fix converters.pipe (#1328) 2024-08-06 13:49:43 +02:00
test_slots.py Drop Python 3.7 (#1340) 2024-08-29 17:35:04 +02:00
test_utils.py Make tests for simple-class actually run 2022-08-22 10:54:22 +02:00
test_validators.py Black dropped us 5 years ago 2024-09-05 09:02:00 +02:00
test_version_info.py Drop Python 2.7 (#936) 2022-03-21 08:47:47 +01:00
typing_example.py Tighten linting (#1175) 2023-08-20 12:03:53 +02:00
utils.py Black dropped us 5 years ago 2024-09-05 09:02:00 +02:00