Commit cfdb1f0 1 parent afe1f42 commit cfdb1f0 Copy full SHA for cfdb1f0
File tree 2 files changed +2
-6
lines changed
2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,10 @@ def load_config(directory: str) -> Config | None:
141
141
if project_name := pyproject_config .get ("project" , {}).get ("name" , "" ):
142
142
# Fallback to the project name for the configuration name
143
143
# and the configuration package entries.
144
- if not config .name :
145
- config .name = project_name
146
144
if not config .package :
147
145
config .package = project_name
146
+ if not config .name :
147
+ config .name = config .package
148
148
149
149
return config
150
150
Original file line number Diff line number Diff line change @@ -257,16 +257,12 @@ def func(test):
257
257
# name fallsback to package
258
258
if "package" in tc_fields :
259
259
package = "d"
260
- elif "package" in pp_fields :
261
- package = "b"
262
260
else :
263
261
package = "foo"
264
262
self .assertEqual (config .package , package )
265
263
266
264
if "name" in tc_fields :
267
265
self .assertEqual (config .name , "c" )
268
- elif "name" in pp_fields :
269
- self .assertEqual (config .name , "a" )
270
266
else :
271
267
# fall-back to package name
272
268
self .assertEqual (config .name , package )
You can’t perform that action at this time.
0 commit comments