Skip to content

Commit

Permalink
Move mypy execution to root directory, and run it on a directory.
Browse files Browse the repository at this point in the history
This is the more common and better-supported way to run mypy, but it
was previously blocked by the fact that our root (lsst) package was
a namespace package.  This change should make no external difference in
what mypy does right now, but I suspect it will be easier to maintain
and I can already say it's much more compatible with at least some
in-editor mypy integration tool.
  • Loading branch information
TallJimbo committed Jul 18, 2020
1 parent a83748a commit 1331dc1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ jobs:
run: pip install mypy

- name: Change to source directory and run mypy
working-directory: ./python
run: mypy lsst
run: mypy python/lsst
4 changes: 4 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# -*- python -*-
from lsst.sconsUtils import scripts
from lsst.sconsUtils import state

scripts.BasicSConstruct("daf_butler", disableCc=True)
mypy = state.env.Command("mypy.log", "python/lsst/daf/butler",
"mypy python/lsst 2>&1 | tee -a mypy.log")
state.env.Alias("mypy", mypy)
1 change: 0 additions & 1 deletion python/mypy.ini → mypy.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[mypy]
warn_unused_configs = True
warn_redundant_casts = True
namespace_packages = True

[mypy-sqlalchemy.*]
ignore_missing_imports = True
Expand Down
6 changes: 0 additions & 6 deletions python/SConscript

This file was deleted.

0 comments on commit 1331dc1

Please sign in to comment.