Open TheCleric opened 4 years ago
Hmm, we observed something similar here: https://github.com/predictive-analytics-lab/data-science-types/pull/155#issuecomment-681001951 I'm not sure what causes this.
Without the setting, mypy doesn't check the type stubs at all.
I'm assuming that without the virtualenv that the check_all does not throw these errors? If so, I wonder if this is a mypy issue.
As a test I deleted my venv and moved it out of the data-science-types directory, and this still occurred. So it doesn't seem to matter that it was in the module folder.
I'm assuming that without the virtualenv that the check_all does not throw these errors? If so, I wonder if this is a mypy issue.
Yes, I don't get any errors from mypy when I run it in my environment (except maybe 1 from the typing module which I can do nothing about).
Usually I use conda environments, so maybe it's related to that. I'll try a venv environment.
It's hacky, but for now I've changed the line && mypy tests \
to && mypy | grep -v venv \
on my local branch (uncommited). I still get a message that there were > 900 errors, but I only see the ones I actually caused. 😆
I am in the process of fleshing out a few pyi files with the definitions from Pandas.
My normal process for python development is to create a virtual environment on the root level of each project (to keep code segregated), like so:
python -m venv venv && . venv/bin/activate && pip install --upgrade pip && pip install -e .[dev]
After updating the pyi files and adding tests, everything looks okay, right up to the end of check_all.sh. When it is running the line
&& mypy tests \
this causes it to find a LOT (> 900 on my machine) of errors from packages in the venv folder. Sample output:Similar lines to those continue for many more lines.
I did notice if I deleted
no_silence_site_packages = True
this goes away, but not sure the intention behind that setting, so I didn't want to delete it and cause downstream issues.