Skip to content

Commit

Permalink
Prevent poliastro.core from importing astropy
Browse files Browse the repository at this point in the history
  • Loading branch information
astrojuanlu committed Nov 9, 2021
1 parent e022f9d commit 71d06c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .importlinter
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[importlinter]
root_package = poliastro
include_external_packages=True

[importlinter:contract:1]
name=poliastro.core does not import astropy.units
type=forbidden
source_modules=
poliastro.core
# astropy.units is not supported,
# see https://github.com/seddonym/import-linter/issues/111
forbidden_modules=
astropy
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ dev = [
"black==21.9b0",
"coverage",
"hypothesis",
"import-linter",
"ipython>=5.0",
"ipywidgets>=7.6",
"isort",
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extras =
# see https://tox.readthedocs.io/en/latest/config.html#conf-usedevelop
usedevelop = False
commands =
lint-imports
pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv}

[testenv:check]
Expand Down

0 comments on commit 71d06c6

Please sign in to comment.