[metadata]
name = example_project
[options]
packages = find_namespace:
[options.extras_require]
all =
%(postgres)s
postgres =
asyncpg
gets rewritten to:
[metadata]
name = example_project
[options]
packages = find_namespace:
[options.extras_require]
all =
asyncpg
postgres =
asyncpg
Minimal example 2:
[metadata]
name = example_project
[options]
packages = find_namespace:
[options.extras_require]
postgres =
asyncpg
sqlite =
aiosqlite
all =
%(postgres)s
%(sqlite)s
raises:
Traceback (most recent call last):
File "/home/ubuntu/check-how-setup-cfg-fmt-works/bin/setup-cfg-fmt", line 8, in <module>
sys.exit(main())
File "/home/ubuntu/check-how-setup-cfg-fmt-works/lib/python3.8/site-packages/setup_cfg_fmt.py", line 503, in main
if format_file(
File "/home/ubuntu/check-how-setup-cfg-fmt-works/lib/python3.8/site-packages/setup_cfg_fmt.py", line 413, in format_file
group_requires = _requires(cfg, key, 'options.extras_require')
File "/home/ubuntu/check-how-setup-cfg-fmt-works/lib/python3.8/site-packages/setup_cfg_fmt.py", line 220, in _requires
normalized = sorted(
File "/home/ubuntu/check-how-setup-cfg-fmt-works/lib/python3.8/site-packages/setup_cfg_fmt.py", line 221, in <genexpr>
(_normalize_req(req) for req in require_group),
File "/home/ubuntu/check-how-setup-cfg-fmt-works/lib/python3.8/site-packages/setup_cfg_fmt.py", line 230, in _normalize_req
normalized = _normalize_lib(lib)
File "/home/ubuntu/check-how-setup-cfg-fmt-works/lib/python3.8/site-packages/setup_cfg_fmt.py", line 244, in _normalize_lib
base = _req_base(lib)
File "/home/ubuntu/check-how-setup-cfg-fmt-works/lib/python3.8/site-packages/setup_cfg_fmt.py", line 261, in _req_base
assert basem
AssertionError
Minimal example 1:
gets rewritten to:
Minimal example 2:
raises: