Skip to content

Commit

Permalink
Rename hy._compat to hy.compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodiologist committed May 3, 2024
1 parent 5784c1f commit e03bc14
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion hy/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from pathlib import Path

import hy
from hy._compat import PY3_9
from hy.compat import PY3_9
from hy.compiler import hy_compile, hy_eval
from hy.errors import HyLanguageError, filtered_hy_exceptions, hy_exc_handler
from hy.importer import runhy
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion hy/core/result_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from funcparserlib.parser import finished, forward_decl, many, maybe, oneplus, some

from hy._compat import PY3_11, PY3_12
from hy.compat import PY3_11, PY3_12
from hy.compiler import Result, asty, mkexpr
from hy.errors import HyEvalError, HyInternalError, HyTypeError
from hy.macros import pattern_macro, require, require_reader, local_macro_name
Expand Down
4 changes: 2 additions & 2 deletions hy/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from contextlib import contextmanager

from hy import _initialize_env_var
from hy._compat import PYPY
from hy.compat import PYPY

_hy_show_internal_errors = _initialize_env_var("HY_SHOW_INTERNAL_ERRORS", False)

Expand Down Expand Up @@ -221,7 +221,7 @@ def _module_filter_name(module_name):
"hy.repl",
"hy.reader.parser",
"hy.importer",
"hy._compat",
"hy.compat",
"hy.macros",
"hy.models",
"hy.core.result_macros",
Expand Down
2 changes: 1 addition & 1 deletion hy/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from funcparserlib.parser import NoParseError

import hy.compiler
from hy._compat import PY3_11
from hy.compat import PY3_11
from hy.errors import (
HyLanguageError,
HyMacroExpansionError,
Expand Down
4 changes: 2 additions & 2 deletions hy/scoping.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import itertools
from abc import ABC, abstractmethod

import hy._compat
import hy.compat
from hy.models import Expression, List, Symbol, Tuple
from hy.reader import mangle

Expand Down Expand Up @@ -85,7 +85,7 @@ class NodeRef:
ast.Nonlocal: "names",
OuterVar: "names",
}
if hy._compat.PY3_10:
if hy.compat.PY3_10:
ACCESSOR.update(
{
ast.MatchAs: "name",
Expand Down
2 changes: 1 addition & 1 deletion tests/compilers/test_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest

import hy
from hy._compat import PY3_11
from hy.compat import PY3_11
from hy.compiler import hy_compile
from hy.errors import HyError, HyLanguageError
from hy.reader import read_many
Expand Down
2 changes: 1 addition & 1 deletion tests/native_tests/defclass.hy
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
(assert (= (. (Quest) swallow) "african")))


(do-mac (when hy._compat.PY3_12 '(defn test-type-params []
(do-mac (when hy.compat.PY3_12 '(defn test-type-params []
(import tests.resources.tp :as ttp)
(defclass :tp [#^ int A #** B] C)
(assert (= (ttp.show C) [
Expand Down
2 changes: 1 addition & 1 deletion tests/native_tests/deftype.hy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(do-mac (when hy._compat.PY3_12 '(do
(do-mac (when hy.compat.PY3_12 '(do

(import tests.resources.tp :as ttp)

Expand Down
2 changes: 1 addition & 1 deletion tests/native_tests/functions.hy
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
(assert (= (. f __annotations__ [k]) v))))


(do-mac (when hy._compat.PY3_12 '(defn test-type-params []
(do-mac (when hy.compat.PY3_12 '(defn test-type-params []
(import tests.resources.tp :as ttp)

(defn foo [])
Expand Down
2 changes: 1 addition & 1 deletion tests/native_tests/import.hy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
sys :as systest
sys
pytest
hy._compat [PYODIDE])
hy.compat [PYODIDE])


(defn test-imported-bits []
Expand Down
2 changes: 1 addition & 1 deletion tests/native_tests/match.hy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(do-mac (when hy._compat.PY3_10 '(do
(do-mac (when hy.compat.PY3_10 '(do


(import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/native_tests/try.hy
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
(assert (= y 1)))


(do-mac (when hy._compat.PY3_11 '(defn test-except* []
(do-mac (when hy.compat.PY3_11 '(defn test-except* []
(setv got "")

(setv return-value (try
Expand Down
2 changes: 1 addition & 1 deletion tests/resources/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from hy._compat import PYODIDE
from hy.compat import PYODIDE

in_init = "chippy"

Expand Down
2 changes: 1 addition & 1 deletion tests/test_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import pytest

from hy._compat import PY3_9, PYODIDE
from hy.compat import PY3_9, PYODIDE

if PYODIDE:
pytest.skip(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hy2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import hy.importer
from hy import mangle
from hy._compat import PYODIDE
from hy.compat import PYODIDE
from tests.resources import can_test_async


Expand Down

0 comments on commit e03bc14

Please sign in to comment.