mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-04-16 04:27:17 -04:00
Fixed pydown to understand imported symbols.
In order to import typing.Union into the module namespace, I had to fix pydown to recognize Union as a defined symbol.
This commit is contained in:
@@ -36,6 +36,7 @@ import datetime
|
||||
import enum
|
||||
import re
|
||||
import abc
|
||||
from typing import Union
|
||||
|
||||
def _cbrt(x):
|
||||
if x < 0.0:
|
||||
@@ -728,7 +729,7 @@ class Time:
|
||||
such as the orbits of planets around the Sun, or the Moon around the Earth.
|
||||
Historically, Terrestrial Time has also been known by the term *Ephemeris Time* (ET).
|
||||
"""
|
||||
def __init__(self, ut, tt = None):
|
||||
def __init__(self, ut : Union[float, str], tt = None):
|
||||
if isinstance(ut, str):
|
||||
# Undocumented hack, to make repr(time) reversible.
|
||||
other = Time.Parse(ut)
|
||||
|
||||
Reference in New Issue
Block a user