dyc icon indicating copy to clipboard operation
dyc copied to clipboard

Keywords in docstrings are not ignored

Open demern opened this issue 4 years ago • 3 comments

Output when running dyc in my workspace contains this:

(dyc-venv) [ndemers@localhost dyc]$ dyc start
`dyc.yaml` Missing or Incorrectly formatted. USING default settings

Processing Methods



In file dyc/dyc/utils.py :

Do you want to document method list keywords: list of keywords like for python, func for go etc.? [y/N]: 
(dyc-venv) [ndemers@localhost dyc]$ 

This is because line 171 in dyc/utils.py is a docstring that contains the keyword def in it. Right now, there is no handling for docstrings that contain keywords, so the tool is incorrectly picking this up as a function/method definition. I think the code that parses files needs enhancement to check when it is inside a docstring and to ignore keywords in that case.

demern avatar Oct 11 '20 21:10 demern

@Zarad1993 Hi, I would like to contribute to the issue "Keywords in docstrings are not ignored#62". Is this issue still open ? Please let me know.

Thank You

devikas94 avatar Dec 09 '20 11:12 devikas94

@devikas94 - Please feel free to contribute. Thank you so much for your interest in the project

Zarad1993 avatar Dec 09 '20 13:12 Zarad1993

@devikas94 - Please feel free to contribute. Thank you so much for your interest in the project

Hi @Zarad1993 - I've posted a PR for the isue here: #64

srishtiganguly avatar Feb 28 '21 21:02 srishtiganguly