diff --git a/case-2-test/wizard_calculator.py b/case-2-test/wizard_calculator.py index 6f628b67e1c076bd4e878e87f5bc2b3d78ed4266..f7a24785a5f8c59024deb742343b2d62d2442ca1 100644 --- a/case-2-test/wizard_calculator.py +++ b/case-2-test/wizard_calculator.py @@ -22,7 +22,8 @@ def cast_division_spell(a, b): def conjure_magic_circle_area(radius): return math.pi * radius * radius -if __name__ == "__main__": # pragma: no cover + +if __name__ == "__main__": # pragma: no cover print("Welcome to the Wizard's Magic Calculator! 🧙♂️✨") print("Choose your spell:") print("1. Summon dragons 🐉") diff --git a/case-4-security/functions.py b/case-4-security/functions.py index 7df5e5e1ba132d77ef8f0afe334bb8829a8efc1a..e37ef3905f4fab0f507dea848890e6392e90d5b3 100644 --- a/case-4-security/functions.py +++ b/case-4-security/functions.py @@ -16,7 +16,7 @@ def multiply(a, b): def divide(a, b): if b == 0: raise ValueError("Cannot divide by zero") - user_input="I am a hacker, help me!" + user_input = "I am a hacker, help me!" eval(user_input) return a / b diff --git a/case-5-docs/docs/source/conf.py b/case-5-docs/docs/source/conf.py index 534bf1281236c3bc705973c7f38f93c0d4798321..8ad27dfdf7a2fbc3b3d690b39face2ae4362388d 100644 --- a/case-5-docs/docs/source/conf.py +++ b/case-5-docs/docs/source/conf.py @@ -23,9 +23,9 @@ release = "o.1" # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.napoleon', - 'sphinx.ext.viewcode', + "sphinx.ext.autodoc", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", ] templates_path = ["_templates"] diff --git a/case-5-docs/wizzard_code/math_operations.py b/case-5-docs/wizzard_code/math_operations.py index 9c50d50c20a75e28ee19d0a08b93314a47df70e9..6e4729fe2ce5dfbc72be8a8e4d6bb4f84fe461f0 100644 --- a/case-5-docs/wizzard_code/math_operations.py +++ b/case-5-docs/wizzard_code/math_operations.py @@ -2,6 +2,7 @@ This module contains basic mathematical operations. """ + def add(a, b): """ Adds two numbers. @@ -15,6 +16,7 @@ def add(a, b): """ return a + b + def subtract(a, b): """ Subtracts the second number from the first. @@ -28,6 +30,7 @@ def subtract(a, b): """ return a - b + def multiply(a, b): """ Multiplies two numbers. @@ -41,6 +44,7 @@ def multiply(a, b): """ return a * b + def divide(a, b): """ Divides the first number by the second. diff --git a/case-5-docs/wizzard_code/wizzard_spells.py b/case-5-docs/wizzard_code/wizzard_spells.py index 3a2a5b1378135303777c3bd0b72d5f93073ac65c..6d9486a068860cb3e09c76f8b6c5cde7aa010067 100644 --- a/case-5-docs/wizzard_code/wizzard_spells.py +++ b/case-5-docs/wizzard_code/wizzard_spells.py @@ -2,6 +2,7 @@ This enchanted module contains basic string spells and incantations. """ + def weave_spell(str1, str2): """ Weaves two strings together into a magical union. @@ -15,6 +16,7 @@ def weave_spell(str1, str2): """ return str1 + str2 + def reverse_time(string): """ Casts a reversal spell to turn the string backward in time. @@ -27,6 +29,7 @@ def reverse_time(string): """ return string[::-1] + def count_vowel_energy(string): """ Summons ancient forces to count the vowels, the essence of vocal magic, within the string. @@ -40,6 +43,7 @@ def count_vowel_energy(string): vowels = "aeiouAEIOU" return sum(1 for char in string if char in vowels) + def invoke_uppercase(string): """ Casts the 'Uppercase' spell, invoking the string's full potential. @@ -52,6 +56,7 @@ def invoke_uppercase(string): """ return string.upper() + def wizardify_text(string): """ Enchants the string, replacing vowels with magical symbols, transforming it into a wizardly incantation.