Giter Club home page Giter Club logo

Comments (9)

auscompgeek avatar auscompgeek commented on July 19, 2024 1

Thanks.

from action-mypy.

tsuyoshicho avatar tsuyoshicho commented on July 19, 2024

Nnn...

@auscompgeek , your requirements.txt need mypy install.

Type below with your develop environment,

$ whiech -a mypy

If work do so OK. return executable path.

And then, GitHub workflow setup and other setting equals to your local develop environment.

CI env is isolated. that's mean direct install OK (not need virutalenv).

Like this.

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [ '3.6', '3.9' ]
    name: Python ${{ matrix.python-version }} test
    steps:
      - uses: actions/checkout@v2
      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
          architecture: x64
      - run: pip install -r requirements.txt
      - uses: tsuyoshicho/action-mypy@v2

from action-mypy.

auscompgeek avatar auscompgeek commented on July 19, 2024

I tried that, it doesn't work: https://github.com/auscompgeek/pyinfiniterecharge/runs/1838375342

(Compare to the output in https://github.com/auscompgeek/pyinfiniterecharge/runs/1838225877)

from action-mypy.

tsuyoshicho avatar tsuyoshicho commented on July 19, 2024

Your work is going well. 😄

Can you see the result?
This is because mypy evaluated it and put out what was NG.

https://github.com/auscompgeek/pyinfiniterecharge/runs/1838383519

Your selected reporter is github-check.
This reporter are reported to github action log.

(Note: If you need report to PR comment, select github-pr-review and work only pull-request.)


But mypy reported not "do not resolved package depends", there are "Cannot find implementation or library stub for module". (This is first problem)

Please setup setup.cfg or mypy.ini your project, and then set ignore_missing_imports per missing stub file (.pyi) library.

see : https://mypy.readthedocs.io/en/stable/config_file.html?highlight=ignore_missing_imports%20#confval-ignore_missing_imports

(or you create stub)

from action-mypy.

auscompgeek avatar auscompgeek commented on July 19, 2024

The packages in question do have type stubs, as per the output from a plain mypy install (again, see the second run provided). Please check again.

from action-mypy.

tsuyoshicho avatar tsuyoshicho commented on July 19, 2024

Unn...

from action-mypy.

auscompgeek avatar auscompgeek commented on July 19, 2024

Simplified test case: https://github.com/auscompgeek/test-action-mypy/actions/runs/542487402

from action-mypy.

tsuyoshicho avatar tsuyoshicho commented on July 19, 2024

Thanks a lot. I continue to think this problem.

from action-mypy.

tsuyoshicho avatar tsuyoshicho commented on July 19, 2024

@auscompgeek ,

I've fixed this problem.
https://github.com/tsuyoshicho/test-action-mypy/actions/runs/542745250

Please use v3 for your repo.
(v3 change inner reason, args do not changed.)


Desc.

This issue reason: docker image run with inner docker python and libs, It dose not use project libs...sorry.

Changes

v3 as composition action, composition use workflow image and workflow setup python,mypy and libs.
This is work correctly.

from action-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.