Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.8.2 doesn't work with mypy linting #1631

Closed
mavysavydav opened this issue Jun 9, 2021 · 5 comments
Closed

Python 3.8.2 doesn't work with mypy linting #1631

mavysavydav opened this issue Jun 9, 2021 · 5 comments
Labels
wontfix This will not be worked on

Comments

@mavysavydav
Copy link
Collaborator

mavysavydav commented Jun 9, 2021

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.

@woop
Copy link
Member

woop commented Jun 9, 2021

Which version of Mypy are you using?

@codyjlin
Copy link
Contributor

codyjlin commented Jun 9, 2021

Which version of Mypy are you using?

@woop

❯ mypy --version
mypy 0.790
❯ python --version
Python 3.8.2

@codyjlin
Copy link
Contributor

codyjlin commented Jun 9, 2021

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)

@woop
Copy link
Member

woop commented Jul 5, 2021

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.

@stale
Copy link

stale bot commented Nov 2, 2021

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.

@stale stale bot added the wontfix This will not be worked on label Nov 2, 2021
@stale stale bot closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants