Skip to content

Commit

Permalink
refactor: merge funcs and maian modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jnoortheen committed Nov 9, 2020
1 parent 37810d6 commit fd0ab1c
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 217 deletions.
4 changes: 1 addition & 3 deletions arger/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from pkg_resources import DistributionNotFound, get_distribution

from arger.funcs import Argument, Option

from .main import Arger
from .main import Arger, Argument, Option

try:
__version__ = get_distribution("arger").version
Expand Down
5 changes: 2 additions & 3 deletions arger/docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,8 @@ def get_parsers():


def parse_docstring(func: tp.Optional[tp.Callable]) -> DocstringTp:
doc = ''
if func:
doc = inspect.getdoc(func)
doc = (inspect.getdoc(func) or '') if func else ''
if doc:
for parser in get_parsers():
if parser.matches(doc):
return parser.parse(doc)
Expand Down
205 changes: 0 additions & 205 deletions arger/funcs.py

This file was deleted.

0 comments on commit fd0ab1c

Please sign in to comment.