Giter VIP home page Giter VIP logo

Comments (5)

elarivie avatar elarivie commented on July 19, 2024

Hello @AugPro, to debug what is happening behind the scene you can use a python wrapper script

Within the atom package linter-mypy settings
Configure the path to python to a shell script like:

#!/bin/sh
# Launch the real python + forward to it every arguments that the wrapper script received
/usr/bin/python3 "$@"

#Exit with the status code of python
exit $?

You will then be able to inspect what is happening
you could add some echo "BlaBla" > ~/DebugStuff.txt

Some of the stuff you may want to inspect are:

  • Current working directory being use
  • The MYPYPATH environment variable
  • The PYTHONPATH environment variable
  • The command line arguments provided "$@"

By extracting those information you'll be able to manually call Mypy the same way the linter-mypy package is doing and be able to debug and find what is being done differently/what is missing to get your plugin used

from linter-mypy.

AugPro avatar AugPro commented on July 19, 2024

Thank you for your quick response @elarivie. Very nice trick, I didn't think about it. I'll test all that soon

from linter-mypy.

AugPro avatar AugPro commented on July 19, 2024

I took some time to debug and found the issue, turns out that the errors were not the same because I thought both commands (from terminal and via linter-mypy) used setup.cfg as it was at the root of my project, and I thought linter-mypy used the file if it existed, but I was wrong ! The solution was simply to explicit the path of setup.cfg in the settings of linter-mypy.

Thanks for the help, we can close this issue

from linter-mypy.

elarivie avatar elarivie commented on July 19, 2024

@AugPro,

Glad you found a solution to your issue,

FYI, since you are using setup.cfg... you should try this other atom package: python-linters

It loads the settings from the "setup.cfg" and it supports all of those linter: flake8, mypy, pydocstyle, pylint

Note: I am the author of both package (linter-mypy and python-linters)

from linter-mypy.

AugPro avatar AugPro commented on July 19, 2024

aah very nice! I'll look into that :) Thanks

from linter-mypy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.