PyCharm Google-docstring russian language parsing problems

38 Views Asked by At

I've a docstring in some function. This is a google-styled docstring. My PyCharm has enabled default syntax checking.
For some reasons I got a PEP hint, that the first letter in a sentence should be capitalised. But, here is the tricky part. This hint occured under the Arg name.
Here is the screenshot, which illustrates, that different sentence contents affects this situation differently.
enter image description here
As you can see, I have no hints in foo, but I have hint in foo1. The only difference is in the content of the previous text line in these functions. And the most important, that the hint says that I need to start every sentence with capital letter. But, in both foo and foo1 we have the dot at the end of the param1 line.

Here is the code fore testing:

def foo(param1: str, param2: int) -> bool:
    """
    Текст, текст, текст.
    Args:
        param1: Некоторый текст, некоторой длины.
        param2: Некоторый текст, некоторой длины.
    Returns:
    """


def foo1(param1: str, param2: int) -> bool:
    """
    Текст, текст, текст.
    Args:
        param1: Некоторый текст, некоторой длины текст.
        param2: Некоторый текст, некоторой длины.
    Returns: None
    """

I've tried to reproduce it in english, but I didn't obtain any result.
What causes such irrational behaviour?

My specs:
PyCharm 2023.1.5 (Community Edition)
Build #PC-231.9414.12, built on February 14, 2024

UPD: Here is the hint example:

enter image description here
It says "this sentence does not start with a capital letter"

1

There are 1 best solutions below

1
clarkb86 On

I copied and pasted your code into PyCharm running on my machine (MacBook Pro M1 2020 - Sonoma 14.4), and I didn't get a PEP hint.

I'm running: PyCharm 2023.3.3 (Professional Edition) Build #PY-233.13763.11, built on January 25, 2024

PyCharm Professional - No PEP hint for non-capitalized word in docstring

Maybe try updating PyCharm to the latest version? (unless you're already running the most recent update).