Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test settings.possible_values() #13796

Merged

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented May 1, 2023

Changelog: Feature: New settings.possible_values() method to query the range of possible values for a setting.
Docs: conan-io/docs#3212
Close #13793

@memsharded memsharded added this to the 2.0.5 milestone May 1, 2023
@@ -7,7 +7,7 @@
WindowsStore:
version: ["8.1", "10.0"]
WindowsCE:
platform: ANY
platform: [ANY]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug, realized while printing things.

@@ -154,7 +154,7 @@ def validate(self):

def get_definition(self):
if isinstance(self._definition, list):
return [e if e != 'None' else None for e in self.values_range]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer use the "None" literal string for this

@memsharded
Copy link
Member Author

Naming possibilities:

  • defined_values()
  • values_ranges()
  • possible_values()
  • ?

@prince-chrismc
Copy link
Contributor

defined/possible _values makes the most sense to me... slight preference to defined :)

@memsharded memsharded marked this pull request as ready for review May 3, 2023 15:07
@memsharded memsharded changed the title test settings.get_definition() test settings.possible_values() May 3, 2023
@czoido czoido merged commit 470fe2c into conan-io:release/2.0 May 4, 2023
@memsharded memsharded deleted the feature/settings_get_definition branch May 4, 2023 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] A way to query values in settings.yml from conanfile.py
3 participants