@@ -229,28 +229,6 @@ def split_commas(value: str) -> list[str]:
229
229
)
230
230
231
231
232
- def _find_pyproject () -> list [str ]:
233
- """Search for file pyproject.toml in the parent directories recursively.
234
-
235
- It resolves symlinks, so if there is any symlink up in the tree, it does not respect them
236
- """
237
- # We start from the parent dir, since 'pyproject.toml' is already parsed
238
- current_dir = os .path .abspath (os .path .join (os .path .curdir , os .path .pardir ))
239
- is_root = False
240
- while not is_root :
241
- for pyproject_name in defaults .PYPROJECT_CONFIG_FILES :
242
- config_file = os .path .join (current_dir , pyproject_name )
243
- if os .path .isfile (config_file ):
244
- return [os .path .abspath (config_file )]
245
- parent = os .path .abspath (os .path .join (current_dir , os .path .pardir ))
246
- is_root = current_dir == parent or any (
247
- os .path .isdir (os .path .join (current_dir , cvs_root )) for cvs_root in (".git" , ".hg" )
248
- )
249
- current_dir = parent
250
-
251
- return []
252
-
253
-
254
232
def parse_config_file (
255
233
options : Options ,
256
234
set_strict_flags : Callable [[], None ],
@@ -270,9 +248,7 @@ def parse_config_file(
270
248
if filename is not None :
271
249
config_files : tuple [str , ...] = (filename ,)
272
250
else :
273
- config_files_iter : Iterable [str ] = map (
274
- os .path .expanduser , defaults .CONFIG_FILES + _find_pyproject ()
275
- )
251
+ config_files_iter : Iterable [str ] = map (os .path .expanduser , defaults .CONFIG_FILES )
276
252
config_files = tuple (config_files_iter )
277
253
278
254
config_parser = configparser .RawConfigParser ()
0 commit comments