mock annotations in Python 3.6

Issue #391 resolved
Andreas Janz created an issue

No description provided.

Comments (3)

  1. Andreas Janz reporter

    @Benjamin Jakimow thought it would be an easy on, but unfortunately, future imports must be at first line. I am not even allowed to put them in try-except 😞

    Any ideas?

    try:
        from __future__ import annotations
    except:
        pass
    

    Gives me:

    from __future__ import annotations
    ^
    SyntaxError: from future imports must occur at the beginning of the file
    

  2. Log in to comment