Skip to content

Python 3.8.2 doesn't work with mypy linting #1631

Closed

Description

@mavysavydav

Expected Behavior

Normal linting checks.

Current Behavior

Errors on type comments and doesn't proceed with rest of lint checking.
`(.venv2) [tw-mbp-davidl feast (master)]$ make lint-python
cd /Users/davidl/workspace/feast/sdk/python; mypy feast/ tests/

feast/client.py:411: error: invalid syntax

Found 1 error in 1 file (checked 109 source files)

make: *** [lint-python] Error 2`

Steps to reproduce

Use Python 3.8.2 and run make lint-python.

Specifications

  • Version: 0.10.7
  • Platform: Mac
  • Subsystem: N/A

Possible Solution

Explore alternatives to type comments. Or possibly there's a setting in mypy (or version of mypy) that can work with 3.8.2 better. Maybe type comments are not encouraged in this Python version. Have not investigated.

Activity

  1. woop commented on Jun 9, 2021

    @woop
    Member

    Which version of Mypy are you using?

  2. codyjlin commented on Jun 9, 2021

    @codyjlin
    Contributor

    Which version of Mypy are you using?

    @woop

    ❯ mypy --version
    mypy 0.790
    ❯ python --version
    Python 3.8.2
  3. codyjlin commented on Jun 9, 2021

    @codyjlin
    Contributor

    I bypassed this by using python 3.7.4 instead. (I followed this article on how to manage different python versions with pyenv).

    It could be worth documenting for now that one should use a particular python version (instead of "3.7 and above") for now in the CONTRIBUTING.md docs. A more expensive fix would be to update all the type annotations to move away from type comments (it seems like type comments are the old way of doing things from the docs)

  4. woop commented on Jul 5, 2021

    @woop
    Member

    Yea I think moving away from type comments makes sense. Another task we have is to delete all the old code like Client.py, which would also reduce the surface area of code that could cause problems like these.

  5. stale commented on Nov 2, 2021

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  6. added
    wontfix
    on Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions