Skip to content

Commit

Permalink
chore: remove flake8 and mypy workarounds (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Feb 5, 2022
1 parent 10d8db9 commit 114a170
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
15 changes: 5 additions & 10 deletions src/citric/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
from citric.client import Client # noqa: F401

try:
from importlib.metadata import PackageNotFoundError, version # type: ignore
except ImportError: # pragma: no cover
from importlib_metadata import PackageNotFoundError, version # type: ignore
from importlib.metadata import version # type: ignore
except ImportError:
from importlib_metadata import version # type: ignore


try:
__version__ = version(__name__)
"""Package version"""
except PackageNotFoundError: # pragma: no cover
__version__ = "unknown"
"""Package version"""
__version__ = version(__name__)
"""Package version"""
2 changes: 1 addition & 1 deletion src/citric/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ResponseMismatchError(Exception):
class LimeSurveyError(Exception):
"""Basic exception raised by LimeSurvey."""

def __init__(self, message: str) -> None: # noqa:: ANN101
def __init__(self, message: str) -> None:
"""Create a generic error for the LimeSurvey RPC API.
Args:
Expand Down
4 changes: 2 additions & 2 deletions src/citric/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, caller: Callable, name: str) -> None:
self.__caller = caller
self.__name = name

def __getattr__(self, name: str) -> "Method": # noqa: ANN101
def __getattr__(self, name: str) -> "Method":
"""Get nested method.
Args:
Expand All @@ -26,7 +26,7 @@ def __getattr__(self, name: str) -> "Method": # noqa: ANN101
"""
return Method(self.__caller, f"{self.__name}.{name}")

def __call__(self, *params: Any) -> Any: # noqa: ANN101
def __call__(self, *params: Any) -> Any:
"""Call RPC method.
Args:
Expand Down

0 comments on commit 114a170

Please sign in to comment.