Add some missing imports

This commit is contained in:
Kodi Arfer 2018-04-06 10:11:59 -07:00
parent 1f95da2b0b
commit 4a6b633ad2
2 changed files with 3 additions and 2 deletions

View File

@ -41,6 +41,7 @@
(if ~@(cut args 2)))))) (if ~@(cut args 2))))))
(defmacro deftag [tag-name lambda-list &rest body] (defmacro deftag [tag-name lambda-list &rest body]
(import hy.models)
(if (and (not (isinstance tag-name hy.models.HySymbol)) (if (and (not (isinstance tag-name hy.models.HySymbol))
(not (isinstance tag-name hy.models.HyString))) (not (isinstance tag-name hy.models.HyString)))
(raise (hy.errors.HyTypeError (raise (hy.errors.HyTypeError

View File

@ -2,7 +2,7 @@
;; This file is part of Hy, which is free software licensed under the Expat ;; This file is part of Hy, which is free software licensed under the Expat
;; license. See the LICENSE. ;; license. See the LICENSE.
(import [hy [HyExpression HySymbol HyString HyBytes]]) (import [hy [HyExpression HySymbol HyString HyBytes HyDict]])
(defn test-quote [] (defn test-quote []
@ -43,7 +43,7 @@
(assert (= (get q 1) (quote bar))) (assert (= (get q 1) (quote bar)))
(assert (= (get q 2) (quote baz))) (assert (= (get q 2) (quote baz)))
(assert (= (get q 3) (quote quux))) (assert (= (get q 3) (quote quux)))
(assert (= (type q) hy.HyDict))) (assert (= (type q) HyDict)))
(defn test-quote-expr-in-dict [] (defn test-quote-expr-in-dict []