From f29080af71ae05835c6555a7c64c2b1d34ad8e2a Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 5 Nov 2024 10:42:47 +0100 Subject: [PATCH] Use walrus operator to improve readability --- README.md | 2 +- python/podio_gen/cpp_generator.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b0686edd1..f13420804 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ version and build that automatically. This behavior is controlled via the `USE_EXTERNAL_CATCH2` cmake variable. It defaults to `AUTO` but can also be set to `ON` or `OFF` to fully control the desired behavior. -### Python > 3.6 +### Python >= 3.8 Check your Python version by doing: diff --git a/python/podio_gen/cpp_generator.py b/python/podio_gen/cpp_generator.py index 398546c9a..980e92383 100644 --- a/python/podio_gen/cpp_generator.py +++ b/python/podio_gen/cpp_generator.py @@ -99,8 +99,8 @@ def post_process(self, datamodel): self._prepare_iorules() self._create_selection_xml() - if datamodel["links"]: - self._write_links_registration_file(datamodel["links"]) + if the_links := datamodel["links"]: + self._write_links_registration_file(the_links) self._write_all_collections_header() self._write_cmake_lists_file()