illiterate icon indicating copy to clipboard operation
illiterate copied to clipboard

Problems with doctorings

Open danielorlando97 opened this issue 2 years ago • 1 comments

I had some problems with the docstrings. I solve two of them :). And the other I comment it at the end, maybe, you haven't noticed it or maybe you defined it like this way.

  • It alway find the end of the docstrings as a line that it starts with """. But any line with the symbols """ after the start of one docstring means that it finishes. So, I changed this:
if self.state == State.Docstring:
      # if line.strip().startswith('"""'):
      if '"""' in line: 
  • Sometimes we use strings with """ into our code, so we cannot take all """ as the start of a docstring. In my case, it took the end of one program log. So, I added a new state to the automata, this new state don't have edge with the docstring state and the automata move to it only when it's in python state and look a line that it doesn't start with """ but it contains """

Finally, I'm not sure that we want to take these 👇🏿 strings as docstrings

def function(*arg, **kwd):
       """ describe of function """

The docstrings look like notes in the illiterate's doc. We can transform these strings in notes???

danielorlando97 avatar Feb 09 '23 02:02 danielorlando97

I forgot it. I also had problems with the commands in the readme. Here said that the command to run this package is python -m illiterate [source] [docs]. But, it seems to me that you make some refactor and you didn't update the Readme because I had to use this python -m illiterate --src [source]:[docs]. I change this command in the Readme, but the other options didn't work me too 🤷🏿

danielorlando97 avatar Feb 09 '23 02:02 danielorlando97