From 601ed631adf5d1df8a1138c5f037d93e7d943685 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 8 Jul 2017 20:35:02 -0400 Subject: Attempt to use coverage to quantify how many of the CONDITIONAL_NAMES we really use (#3763) * Attempt to use coverage to quantify how many of the CONDITIONAL_NAMES we really use * rewrite file to improve coverage * Write it this way so we can use line coverage * lost this one :-( * fix comment and flake8 * update the docs as well * flake8 --- docs/development/c-bindings.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'docs/development') diff --git a/docs/development/c-bindings.rst b/docs/development/c-bindings.rst index 43ec4d8d..8a9bb6de 100644 --- a/docs/development/c-bindings.rst +++ b/docs/development/c-bindings.rst @@ -167,15 +167,22 @@ the necessarily type definitions are in place. Finally, add an entry to ``CONDITIONAL_NAMES`` with all of the things you want to conditionally export:: - CONDITIONAL_NAMES = { - ... - "Cryptography_HAS_QUANTUM_TRANSMOGRIFICATION": [ + def cryptography_has_quantum_transmogrification(): + return [ "QM_TRANSMOGRIFICATION_ALIGNMENT_LEFT", "QM_TRANSMOGRIFICATION_ALIGNMENT_RIGHT", - "QM_transmogrify" + "QM_transmogrify", ] + + + CONDITIONAL_NAMES = { + ... + "Cryptography_HAS_QUANTUM_TRANSMOGRIFICATION": ( + cryptography_has_quantum_transmogrification + ), } + Caveats ~~~~~~~ -- cgit v1.2.3