Mimesis: Documentation is Broken

Created on 13 Nov 2018  路  13Comments  路  Source: lk-geimfari/mimesis

Bug report

What's wrong


The method / class documentation for Mimesis is broken. https://mimesis.readthedocs.io/api.html#internet

How is that should be

If I load the above link, I should see information about the class and how to use it.

System information

Any and all, tested on multiple computers. Issue has been occurring for students since about 3pm EST yesterday or so.

bug enhancement

Most helpful comment

@itsthejoker @harshilsharma63 It's fixed.

All 13 comments

Seems like latest commit does don't fix this issue.

It's still broken guys!

@harshilsharma63 @itsthejoker I'm really busy if someone of you, guys can create PR I'll really thankful.

@lk-geimfari I'll spend some time today and see if I can figure this out.

@lk-geimfari so I generated docs locally against master and they look just fine! Might a re-deployment do the trick?

@harshilsharma63 I have rebuild docs and it did not have any effect.

@lk-geimfari is is broken for you locally as well?

@harshilsharma63 Nope, locally works pretty fine.

@sobolevn Any idea why it can happen?

This happens because readthedocs uses python3.5 by default.
And we use python3.6 features:

WARNING: autodoc: failed to import class 'builtins.BrazilSpecProvider' from module 'mimesis'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/mimesis/envs/latest/lib/python3.5/site-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module
    __import__(modname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/mimesis/checkouts/latest/mimesis/__init__.py", line 8, in <module>
    from mimesis.providers import *
  File "/home/docs/checkouts/readthedocs.org/user_builds/mimesis/checkouts/latest/mimesis/providers/__init__.py", line 3, in <module>
    from mimesis.providers.base import BaseProvider, BaseDataProvider
  File "/home/docs/checkouts/readthedocs.org/user_builds/mimesis/checkouts/latest/mimesis/providers/base.py", line 77
    self._data: dict
              ^
SyntaxError: invalid syntax

I see two things to improve here:

  1. create readthedocs.yml and specify correct python version
  2. fix type annotation: dict is not a correct type annotation. Because what really written is: Dict[Any, Any], I know that we can limit this to something better

@sobolevn I didn't even think about it. Thanks!

@itsthejoker @harshilsharma63 It's fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sobolevn picture sobolevn  路  6Comments

lk-geimfari picture lk-geimfari  路  3Comments

lk-geimfari picture lk-geimfari  路  7Comments

lk-geimfari picture lk-geimfari  路  4Comments

lk-geimfari picture lk-geimfari  路  6Comments