diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ac84374e..e1482ea4e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -exclude: "asdf/(extern||_jsonschema)/.*" +exclude: "asdf/(_extern||_jsonschema)/.*" repos: - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/asdf/extern/RangeHTTPServer.py b/asdf/_extern/RangeHTTPServer.py similarity index 100% rename from asdf/extern/RangeHTTPServer.py rename to asdf/_extern/RangeHTTPServer.py diff --git a/asdf/extern/__init__.py b/asdf/_extern/__init__.py similarity index 100% rename from asdf/extern/__init__.py rename to asdf/_extern/__init__.py diff --git a/asdf/extern/atomicfile.py b/asdf/_extern/atomicfile.py similarity index 100% rename from asdf/extern/atomicfile.py rename to asdf/_extern/atomicfile.py diff --git a/asdf/_tests/httpserver.py b/asdf/_tests/httpserver.py index 8e9d3956f..3de3f62d2 100644 --- a/asdf/_tests/httpserver.py +++ b/asdf/_tests/httpserver.py @@ -6,7 +6,7 @@ import tempfile import threading -from asdf.extern.RangeHTTPServer import RangeHTTPRequestHandler +from asdf._extern.RangeHTTPServer import RangeHTTPRequestHandler __all__ = ["HTTPServer", "RangeHTTPServer"] diff --git a/asdf/generic_io.py b/asdf/generic_io.py index 1ebe660fc..b63563a67 100644 --- a/asdf/generic_io.py +++ b/asdf/generic_io.py @@ -20,8 +20,8 @@ import numpy as np from . import util +from ._extern import atomicfile from .exceptions import DelimiterNotFoundError -from .extern import atomicfile from .util import _patched_urllib_parse __all__ = ["get_file", "get_uri", "resolve_uri", "relative_uri"] diff --git a/pyproject.toml b/pyproject.toml index 98c45744f..d6aac0724 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,7 +90,7 @@ force-exclude = ''' | \.git | \.pytest_cache | \.tox - | asdf/extern + | asdf/_extern | asdf/_jsonschema | build | dist @@ -126,7 +126,7 @@ omit = [ 'asdf/*/*/tests/*', 'asdf/version.*', 'asdf/compat*', - 'asdf/extern*', + 'asdf/_extern*', 'asdf/_jsonschema/**', # And again for running against installed version '*/asdf/_astropy_init*', @@ -141,7 +141,7 @@ omit = [ '*/asdf/*/*/tests/*', '*/asdf/version.*', '*/asdf/compat*', - '*/asdf/extern*', + '*/asdf/_extern*', '*/asdf/_jsonschema/**', ] @@ -176,7 +176,7 @@ extend-ignore = [ "S310", # URL open for permitted schemes "RUF012", # mutable-class-default (typing related) ] -extend-exclude = ["asdf/extern/*", "asdf/_jsonschema/*", "docs/*"] +extend-exclude = ["asdf/_extern/*", "asdf/_jsonschema/*", "docs/*"] [tool.ruff.per-file-ignores] "test_*.py" = ["S101"] @@ -184,10 +184,10 @@ extend-exclude = ["asdf/extern/*", "asdf/_jsonschema/*", "docs/*"] "compatibility_tests/common.py" = ["S101"] [tool.flynt] -exclude = ["asdf/extern/*", "asdf/_jsonschema/*"] +exclude = ["asdf/_extern/*", "asdf/_jsonschema/*"] [tool.codespell] -skip="*.pdf,*.asdf,.tox,asdf/extern,asdf/_jsonschema,build,./tags,.git,docs/_build" +skip="*.pdf,*.asdf,.tox,asdf/_extern,asdf/_jsonschema,build,./tags,.git,docs/_build" ignore-words-list=""" fo,afile, """