Closed RuRo closed 3 years ago
I am assuming, that you aren't pinning the exact dependency versions for CI? Sphinx version 4 came out fairly recently and the docs are now apparently failing. I didn't touch anything documentation-related, so I doubt that this is my fault.
Edit: the problem seems to be that you are setting the language
to python
in docs/conf.py
which is pretty weird considering this confval
is supposed to be used for natural languages and translations (English/Japanese/etc). It's kind of surprising that it worked in the first place.
Edit Edit: You can either just pin the sphinx version to be <4
in setup.cfg
like this:
[options.extras_require]
docs =
Sphinx>=3,<4
or remove the
language = "python"
line from doc/conf.py
. The default value for language
doesn't perform any translation, which is probably what was happening with language = "python"
anyway.
@erikseulean wdyt?
I've also fixed a few more Callable
bugs, PTAL.
Sorry, for some reasons I missed this completely. Apologise. Will review today.
@RuRo could you please squash your commits and rebase ?
@RuRo could you please squash your commits and rebase ?
I think the current changes are already rebased on top of the current master. If you can't squash the commits automatically when merging the PR for some reason, I can squash them after the current changes are approved.
Sure. Just to make sure, by "squash the test and implementation commits of each kind" do you mean
1) squash all the tests together and all the implementation commits together 2) squash each implementation commit with its respective test commit 3) squash all the commits
?
I've decided that you probably meant (2) and did that.
It's that time of the week, where I go around all the PRs I am participating in and ping everyone!
@erikseulean @saytosid can I do anything to get this PR accepted?
Oof. I haven't noticed, that you still support python 2.7. I'll fix the syntax errors.
As for the documentation failing, see my earlier comment. That problem wasn't caused by me, but by your unpinned sphinx version getting updated. You'll need to either pin the version or change the language setting.
(I can fix it for you in this PR if you want, but you need to choose, which option do you prefer)
Change the language settings, feel free to add it here or even better a parallel pr 🙏
Describe your changes
This PR fixes some false positive errors with
Callable
types.1) According to PEP 484 "When used in a type hint, the expression
None
is considered equivalent totype(None)
." Currently, this is not the case for return values ofCallable
type hints.2) Functions with default values for arguments weren't handled properly.
With this PR, the following function
3) Functions with keyword-only arguments weren't handled properly.
With this PR,
Testing performed
I added test cases for each item in "Describe your changes" (both false positives and false negatives).