mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 19:03:02 +08:00
Tighten up psf/black and flake8 (#2024)
* Tighten up psf/black and flake8 * Fix some tests * Fix some E741 * Fix some E741 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -50,7 +50,7 @@ def solution(n):
|
||||
"""
|
||||
try:
|
||||
n = int(n)
|
||||
except (TypeError, ValueError) as e:
|
||||
except (TypeError, ValueError):
|
||||
raise TypeError("Parameter n must be int or passive of cast to int.")
|
||||
if n <= 0:
|
||||
raise ValueError("Parameter n must be greater or equal to one.")
|
||||
|
@ -37,7 +37,7 @@ def solution(n):
|
||||
"""
|
||||
try:
|
||||
n = int(n)
|
||||
except (TypeError, ValueError) as e:
|
||||
except (TypeError, ValueError):
|
||||
raise TypeError("Parameter n must be int or passive of cast to int.")
|
||||
if n <= 0:
|
||||
raise ValueError("Parameter n must be greater or equal to one.")
|
||||
|
Reference in New Issue
Block a user