Comments (6)
Hello @DavidS3141
An "Internal Error" means an internal error within the lint tool mypy itself, you should therefore fill a bug report as shown in the error message to Mypy issue tracker
Note: An Internal error also implies that you would have obtained the same error if you would have call mypy manually using the CLI.
From A linter-mypy point of view, the only error that I see from the provided information is that the Mypy Nofity Internal Error setting is not checked and you are nevertheless still receiving the error pop-up. Which atom version, which linter-mypy version are you using?
Note: I have seen, and know how to trigger some Mypy internal error, but the one that you have is a new one to me...I am curious to know
- Which OS you are using
- Which python version you are using
- Which installation step for Mypy you used.
- etc... give some more information about your configuration
(The above information are most likely also going to be ask by Mypy maintainers)
In the meantime to help you debug your current environment I suggest to fully uninstall Mypy and re-install it using the following command line:
python3 -m pip uninstall mypy
python3 -m pip install -U mypy
Then make sure that you can manually using the CLI trigger a Mypy lint and obtain some warning without any internal error.
from linter-mypy.
Yeah sry, I should have been clearer, I know that the first part sounds like mypy
issue, I just wanted to note it here for completeness. My problem was with the option obviously not working as intended for silencing the pop ups.
I am using the newest lint-mypy (2.6.9), mypy (0.770) and atom (1.45.0) I think.
I installed mypy via pip like you have shown under python version 3.6.9 under Ubuntu 18.04
I tried now some configuration settings out but I am new to mypy and can't really tell some of the options apart from what they are doing 'exactly'.
I will be able to check on the INTERNAL ERROR stuff on Monday at work, but today I found again something interesting, a discrepancy between lint-mypy and the CLI trigger.
src/pack/module.py
def some_func_with_type_annotations()...
src/pack/init.py
from .module import some_func_with_type_annotations
src/some_file_on_which_i_run_mypy.py
from pack import some_func_with_type_annotations
The above setup shows me an [attr-defined] error in Atom from lint-mypy telling me that the module pack
has no member some_func_with_type_annotations
. However, if I execute mypy
on the CLI for the last file, it tells me everything is ok.
Interestingly, when I change the __init__.py
from pack
from the original from .module import func
to from .module import func as func
, then lint-mypy aggrees and also starts telling me that everything is okay.
from linter-mypy.
Actually I might not be able to have mypy
correctly working, as it seems to show me no type error when using the function, although I intenionally put one in, and lint-mypy actually shows me the error when I "fix" the init.py like mentioned before.
It seems like I have gotten something very wrong about how mypy
works with imports?
from linter-mypy.
Hello @DavidS3141,
I took a look at linter-mypy source code related to mypy internal error detection...
the code is currently looking for the following string:
": error: INTERNAL ERROR -- please report a bug at https://github.com/python/mypy/issues"
while the error from mypy that you receive is:
"error: INTERNAL ERROR -- Please try using mypy master on Github: https://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-build Please report a bug at https://github.com/python/mypy/issues"
This string difference prevent linter-mypy from correctly identifying the internal error.
Both string are highly similar except:
- That the word "please" first letter is upper case in your version
- Yours contains some extra text in the middle about a development build
Linter-mypy fix: I'll update linter-mypy to make it less picky by only looking for the string:
"error: INTERNAL ERROR --"
By doing so the internal error will be detected in both cases and therefore you will have control to show or not the pop-up from linter-mypy settings
But...
- You may want to review you local Mypy installation because you seem to have a development version installed.
- The linter-mypy fix that I will do won't fix the root internal error present in Mypy, you should therefore still fill a bug report at the Mypy project.
from linter-mypy.
The fix is now available in linter-mypy v2.6.10
@DavidS3141
Let me know if it solves your pop-up issue
from linter-mypy.
Turning off the internal errors work now. And I have got now parity between the results from linter-mypy and the CLI mypy, still some issues with imports but I will head over to mypy and reference my issue here for completeness later.
Thanks for your help.
EDIT:
So one issue for my import errors were that I did not use --namespace-packages
of mypy, as I do not use __init__.py
in my packages. Did not know about this subtle difference and thought until now, that a package is a package. Also it does not help that the default setting for this is off.
Anyway, there was still this issue with the INTERNAL ERROR, which I reported here.
from linter-mypy.
Related Issues (20)
- Feature request: Add $PROJECT_PATH and $PROJECT_NAME resolution for MYPYPATH setting. HOT 3
- Add option to only check repos where mypy.ini is present HOT 3
- Object.dirname is deprecated. HOT 2
- Doesn't find imports >= 5 levels deep HOT 1
- Can you expose the option of specifying a cache folder HOT 7
- Unable to find installed modules HOT 3
- UnicodeEncodeError HOT 1
- Does not seem to work with pipenv HOT 2
- Can't detect mypy anymore HOT 9
- linter-mypy generating many duplicate errors HOT 2
- Read settings from setup.cfg HOT 2
- Does not recognise typed_ast package HOT 5
- Errors are shown on incorrect files HOT 3
- Option to start the mypy process from the (Atom) project directory? HOT 3
- (semi-) colon separated Python Executable Path? HOT 5
- Are mypy plugins supported ? HOT 5
- Unable to find mypy, despite correct $PATH and settings HOT 3
- How can I set $MYPYPATH so that the linter will pick up on it? HOT 1
- $PROJECT_NAME is invalid in case project folder contains dot. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linter-mypy.