fix: π Updating & Add Special Numbers code snippets #378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
β Closes: #366
This pull request includes significant changes to the
pysnippets/SpecialNumbers
module, primarily focusing on adding logging functionality and updating the functions to raise exceptions for invalid inputs. Additionally, several test files have been removed.Logging and error handling improvements:
pysnippets/SpecialNumbers/Abundant.py
: Added logging for debugging and error handling, and updated theis_abundant
function to raise aValueError
for invalid inputs.pysnippets/SpecialNumbers/Armstrong.py
: Added logging and updated theis_armstrong
function to raise aValueError
for invalid inputs.pysnippets/SpecialNumbers/Automorphic.py
: Added logging and updated theis_automorphic
function to raise aValueError
for invalid inputs.pysnippets/SpecialNumbers/Deficient.py
: Added logging for debugging and error handling, and updated theis_deficient
function to raise aValueError
for invalid inputs.pysnippets/SpecialNumbers/Happy.py
: Added logging for debugging and error handling, and updated theis_happy
function to raise aValueError
for invalid inputs.pysnippets/SpecialNumbers/Kaprekar.py
: Added logging for debugging and error handling, and updated theis_kaprekar
function to raise aValueError
for invalid inputs.pysnippets/SpecialNumbers/Neon.py
: Added logging and updated theis_neon
function to raise aValueError
for invalid inputs.pysnippets/SpecialNumbers/Palindrome.py
: Added logging and updated theis_palindrome
function to raise aValueError
for invalid inputs.Test file removals:
Tests/SpecialNumbers/Test_Armstrong.py
as part of the cleanup.Tests/SpecialNumbers/Test_Automorphic.py
as part of the cleanup.Tests/SpecialNumbers/Test_Neon.py
as part of the cleanup.Tests/SpecialNumbers/Test_Palindrome.py
as part of the cleanup.Tests/SpecialNumbers/Test_Perfect.py
as part of the cleanup.Tests/SpecialNumbers/Test_strong.py
as part of the cleanup.Tests/webscrape/test_scrape.py
as part of the cleanup.@UTSAVS26 Kindly review this PR