Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "all args are kw-only" #340

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autoapi/mappers/python/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def _format_args(args_info, include_annotations=True, ignore_self=None):
result = []

for i, (prefix, name, annotation, default) in enumerate(args_info):
if i == 0 and name == ignore_self:
if i == 0 and ignore_self is not None and name == ignore_self:
continue
formatted = "{}{}{}{}".format(
prefix or "",
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
2 changes: 1 addition & 1 deletion tests/dotnetexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/goexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/jsexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/py38positionalparams/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/py3example/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/py3implicitnamespace/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pyannotationcommentsexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pyautodoc_typehints/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pyemptyexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pyexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pyiexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pyiexample2/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pypackagecomplex/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pypackageexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pyskipexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
2 changes: 1 addition & 1 deletion tests/templateexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down
7 changes: 7 additions & 0 deletions tests/test_astroid_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ def func({}) -> str: #@
sys.version_info[:2] < (3, 8), reason="Uses Python 3.8+ syntax"
),
),
pytest.param(
"*, a: int, b: int",
"*, a: int, b: int",
marks=pytest.mark.skipif(
sys.version_info[:2] < (3, 8), reason="Uses Python 3.8+ syntax"
),
),
("a: int, *args, b: str, **kwargs", "a: int, *args, b: str, **kwargs"),
("a: 'A'", "a: A"),
],
Expand Down
2 changes: 1 addition & 1 deletion tests/toctreeexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
author = "readthedocs"
version = "0.1"
release = "0.1"
language = None
language = 'en'
exclude_patterns = ["_build"]
pygments_style = "sphinx"
todo_include_todos = False
Expand Down