Sunday 15 September 2013

python - How to find undocumented methods in my code? -


I am writing a document for a project and I have to make sure that I do not remember any method. The codes are written in python and I am using PyCharm as a text.

Actually, I need REGEX to do something like this:

  def method_name (parameter): SomeVar = some () ...  < / Pre> 

but this match should not be:

  def method_name (with parameter): "" "doctor string" ... ... ...   

I tried to use the search of the peachm with the feature of Riyaxx with the pattern ): \ s * [^ "'] : Any subsequent line that does not begin with or ', but it does not work is. Any ideas why?

I do not know the dragon, but I know my regex.

And the issues of your regex are first, as the comments are mentioned, you may have to escape from the closing bracket. Second, after the function declaration, you do not match the new line. Finally, you search for a single or double quote on a line START, but white space is included at the beginning of a line.

I was able to match your sample file with ): \ s * \ N \ s * ["'] This is a multilanguage regime. All programs with multiline rijks For example, with grep , you have to use

this is a quick explanation of the rajx, a quick explanation of this: after a semicolon The closing bracket looks for any number of alternate white space, which can be followed in any number. White space (in the end, in this case). In the end, there should be a single or double quote. Note that it works in matches that do have any comments. Want to find them?

No comments:

Post a Comment