You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
Similar to #117, on darglint 1.8.0 I am getting a DAR003 issue on a docstring that does not look like has anything strange going for it and I am wondering what I am doing wrong with that. The code fragment is as follows:
@pytest.fixture(scope="session")defssh_output_path() ->Path:
"""Return the common path for output files created from tests. :returns: the output directory. :raise FileNotFoundError: if the found path does not exist. :raise NotADirectoryError: if the found path is not a directory. """path=Path("testoutput") /"test"check_directory_path(path)
returnpath
and I also checked that there isn't any other spurious whitespace lingering around:
The darglint configuration is set to default except for the docstring style being sphinx and strictness being set to full.
Interestingly the error message occurs on the first :raise line, with the same description as #117, "Incorrect indentation: ~<":
205: 1 DAR003 Incorrect indentation: ~< [flake8-darglint]
"""Return the common path for output files created from tests. :returns: the output directory. :raise FileNotFoundError: if the found path does not exist. :raise NotADirectoryError: if the found path is not a directory."""
^
Is there anything else I can try to see if this can be sorted out?
Thanks!
The text was updated successfully, but these errors were encountered:
Thanks @webknjaz ! I just ran into the exact same issue, after writing :raise: instead of :raises: and was about to add an "ignore" comment, before I read your comment.
The confusing thing for me is that there appears to be some inconsistency between my pycharm editor and darglint linting.
The raise keyword is highlighted by pycharm as if it were a valid keyword, but darglint complains about it
I'm not an expert on docstrings, so I am not really sure, whether or under which conditions raise (without s) is actually valid. But in my case this compiles succesfully with sphinx.
Similar to #117, on darglint 1.8.0 I am getting a
DAR003
issue on a docstring that does not look like has anything strange going for it and I am wondering what I am doing wrong with that. The code fragment is as follows:and I also checked that there isn't any other spurious whitespace lingering around:
The darglint configuration is set to default except for the docstring style being
sphinx
and strictness being set tofull
.Interestingly the error message occurs on the first
:raise
line, with the same description as #117, "Incorrect indentation: ~<":Is there anything else I can try to see if this can be sorted out?
Thanks!
The text was updated successfully, but these errors were encountered: