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: explicit optional types in config.py #472

Merged
merged 3 commits into from
Jan 30, 2023

Conversation

dee-me-tree-or-love
Copy link
Member

@dee-me-tree-or-love dee-me-tree-or-love commented Jan 30, 2023

What

This solves a small typing issue in config.py:

...
Run mypy docker/test_docker.py pypiserver/config.py  tests/test_init.py
pypiserver/config.py:692:48: error: Incompatible default for argument "auther" (default has type "None", argument has type "Callable[[str, str], bool]")  [assignment]
...
pypiserver/config.py:831:48: error: Incompatible default for argument "args" (default has type "None", argument has type "Sequence[str]")  [assignment]
...

Solved by explicitly declaring it as t.Optional.

@dee-me-tree-or-love dee-me-tree-or-love changed the title fix: make auther function type optional in Config fix: explicit optional types in config.py Jan 30, 2023
@dee-me-tree-or-love
Copy link
Member Author

NB: the failing tests for Python 3.6 will be fixed in #471 ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant