Skip to content

Commit

Permalink
Added pylint (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
duketemon committed May 14, 2023
1 parent e66d1db commit 1ef8b5c
Show file tree
Hide file tree
Showing 5 changed files with 270 additions and 42 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ style:
isort --check --diff .
black --check --diff .
mypy -p currency_codes
pylint currency_codes

tests:
pytest tests -vv
Expand Down
12 changes: 6 additions & 6 deletions currency_codes/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class CurrencyNotFoundError(ValueError):
def __init__(self, property_name: str, given_value: str) -> None:
"""Raises then no currency have been found
"""Raises then no currency have been found
Args:
property_name (str): name of currency's property
given_value (str): the value used passed to a function
"""
Args:
property_name (str): name of currency's property
given_value (str): the value used passed to a function
"""

def __init__(self, property_name: str, given_value: str) -> None:
full_message = f"No currency found when {property_name} equals {given_value}"
super().__init__(full_message)
3 changes: 2 additions & 1 deletion currency_codes/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def get_currency_by_code(code: str, case_sensitive: bool = False) -> Currency:
Args:
code (str): country code
case_sensitive (bool): determines whether filters will be treated as case-sensitive for a given code
case_sensitive (bool): determines whether filters will be treated as a case-sensitive
for a given currency code
Returns:
Currency: a corresponding currency
Expand Down
Loading

0 comments on commit 1ef8b5c

Please sign in to comment.