Improve debug printing for resolving origin of config settings (#8729) · astral-sh/ruff@e2109c1 (original) (raw)

`@@ -43,7 +43,7 @@ pub fn resolve(

`

43

43

`{

`

44

44

`let settings = resolve_root_settings(&pyproject, Relativity::Cwd, overrides)?;

`

45

45

`debug!(

`

46

``

`-

"Using user specified pyproject.toml at {}",

`

``

46

`+

"Using user-specified configuration file at: {}",

`

47

47

` pyproject.display()

`

48

48

`);

`

49

49

`return Ok(PyprojectConfig::new(

`

`@@ -63,7 +63,10 @@ pub fn resolve(

`

63

63

`.as_ref()

`

64

64

`.unwrap_or(&path_dedot::CWD.as_path()),

`

65

65

`)? {

`

66

``

`-

debug!("Using pyproject.toml (parent) at {}", pyproject.display());

`

``

66

`+

debug!(

`

``

67

`+

"Using configuration file (via parent) at: {}",

`

``

68

`+

pyproject.display()

`

``

69

`+

);

`

67

70

`let settings = resolve_root_settings(&pyproject, Relativity::Parent, overrides)?;

`

68

71

`return Ok(PyprojectConfig::new(

`

69

72

`PyprojectDiscoveryStrategy::Hierarchical,

`

`@@ -77,7 +80,10 @@ pub fn resolve(

`

77

80

`` // end up the "closest" pyproject.toml file for every Python file later on, so

``

78

81

`// these act as the "default" settings.)

`

79

82

`if let Some(pyproject) = pyproject::find_user_settings_toml() {

`

80

``

`-

debug!("Using pyproject.toml (cwd) at {}", pyproject.display());

`

``

83

`+

debug!(

`

``

84

`+

"Using configuration file (via cwd) at: {}",

`

``

85

`+

pyproject.display()

`

``

86

`+

);

`

81

87

`let settings = resolve_root_settings(&pyproject, Relativity::Cwd, overrides)?;

`

82

88

`return Ok(PyprojectConfig::new(

`

83

89

`PyprojectDiscoveryStrategy::Hierarchical,

`