jameslamb / doppel-cli

Test framework for comparing the consistency of library APIs
https://doppel-cli.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
8 stars 12 forks source link

[ci] fix mypy error about duplicate modules #203

Closed jameslamb closed 1 year ago

jameslamb commented 3 years ago

make lint is currently raising the following error using mypy 0.910 (the newest version).

integration_tests/test-packages/python/pythonspecific2/setup.py: error: Duplicate module named "setup" (also at "/home/runner/work/doppel-cli/doppel-cli/integration_tests/test-packages/python/pythonspecific/setup.py") integration_tests/test-packages/python/pythonspecific2/setup.py: note: Are you missing an init.py? Alternatively, consider using --exclude to avoid checking one of them. Found 1 error in 1 file (errors prevented further checking) make: *** [Makefile:7: lint] Error 1 Error: Process completed with exit code 2.

See, for example, https://github.com/jameslamb/doppel-cli/pull/202/checks?check_run_id=3336400834 from #202.

I think is because that code is running mypy over the whole repo, and it wasn't designed to lint an entire repo that contains multiple Python packages.

This PR proposes running mypy over individual directories one at a time, to avoid that issue.

codecov-commenter commented 3 years ago

Codecov Report

Merging #203 (e5c3202) into main (dfc6bd3) will not change coverage. The diff coverage is n/a.

:exclamation: Current head e5c3202 differs from pull request most recent head fb6bf70. Consider uploading reports for the commit fb6bf70 to get more accurate results Impacted file tree graph

@@            Coverage Diff            @@
##              main      #203   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          322       322           
=========================================
  Hits           322       322           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dfc6bd3...fb6bf70. Read the comment docs.

jameslamb commented 3 years ago

More linting issues:

Warning message: package ‘lintr’ was built under R version 3.6.3 Found 16 R files to lint Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace ‘xfun’ 0.15 is being loaded, but >= 0.21 is required Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace Execution halted

jameslamb commented 1 year ago

I'll fix this is in a separate PR in the future. Closing for now.