From 10900fc16d140118e6cd255e3a8ef3c1bccfab00 Mon Sep 17 00:00:00 2001 From: Croydon Date: Thu, 6 Jun 2024 19:08:49 +0200 Subject: [PATCH] Add some comments --- .../actions/check_for_deprecated_settings.py | 1 + bincrafters_conventions/actions/update_c_imports.py | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/bincrafters_conventions/actions/check_for_deprecated_settings.py b/bincrafters_conventions/actions/check_for_deprecated_settings.py index 738e2ae..d14fdcb 100644 --- a/bincrafters_conventions/actions/check_for_deprecated_settings.py +++ b/bincrafters_conventions/actions/check_for_deprecated_settings.py @@ -3,6 +3,7 @@ def check_for_deprecated_settings(main, file): """ settings = main._compat_api.graph.compat_inspect_attribute(conanfile=file, attribute="settings") + # Conan >= 1.15.0 if settings and "cppstd" in settings: main.output_result_check(passed=False, title="Deprecated settings", reason=f"deprecated attribute(s): {settings}") diff --git a/bincrafters_conventions/actions/update_c_imports.py b/bincrafters_conventions/actions/update_c_imports.py index dc43a4c..3096463 100644 --- a/bincrafters_conventions/actions/update_c_imports.py +++ b/bincrafters_conventions/actions/update_c_imports.py @@ -11,11 +11,22 @@ def update_c_imports(main, file): imports = {} # Schema: + # # first line: from original_X import original_Y -> ("original_X", "original_Y") # second line: from updated_X import updated_Y -> ("updated_X", "updated_Y") # third line: ("min Conan version the new import works", "first Conan version the new import BREAKS, doesn't work anymore, add * if there is no such version yet") # for the imported symbols: + # # * is both a literal * from imports, but also telling the script to just leave unchaged whatever was imported; useful for just changing from where you import + # + # Another example, updating an import in the form of + # import os + # to + # import shiny_new_os + # can be archived with + # [("*", "os"), ("*", "shiny_new_os"), ("*", "*")] + # + imports_updates_conan = [ # Conan 1.15 [