From fdbad8a25241cba708e54d8d30cdda61c8dea9ff Mon Sep 17 00:00:00 2001 From: Don Cross Date: Tue, 9 Jul 2019 18:16:04 -0400 Subject: [PATCH] Python type annotations are causing problems. I'm not going to use type annotations in function signatures because they are causing more problems than they are worth. The last straw was that different versions of Python don't generate the same text representation. This broke my Travis CI tests. --- generate/template/astronomy.py | 4 ++-- pydown/pydown.py | 1 - source/python/README.md | 4 ++-- source/python/astronomy.py | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/generate/template/astronomy.py b/generate/template/astronomy.py index 57cf7a6f..1376041f 100644 --- a/generate/template/astronomy.py +++ b/generate/template/astronomy.py @@ -123,7 +123,7 @@ class Body(IntEnum): Moon = 10 """The body code for the Moon.""" -def BodyCode(name) -> Body: +def BodyCode(name): """Finds the Body enumeration value, given the name of a body. Parameters @@ -700,7 +700,7 @@ def _CalcMoon(time): (_ARC * (_ERAD / _AU)) / (0.999953253 * SINPI) ) -def GeoMoon(time:Time) -> Vector: +def GeoMoon(time): """Calculates the geocentric position of the Moon at a given time. Given a time of observation, calculates the Moon's position as a vector. diff --git a/pydown/pydown.py b/pydown/pydown.py index 24acf6e2..f2c41637 100755 --- a/pydown/pydown.py +++ b/pydown/pydown.py @@ -24,7 +24,6 @@ def LoadModule(inPythonFileName): def HtmlEscape(text): text = text.replace('&', '&') - text = text.replace('->', '⇒') text = text.replace('<', '<') text = text.replace('>', '>') return text diff --git a/source/python/README.md b/source/python/README.md index 61900420..1c23f058 100644 --- a/source/python/README.md +++ b/source/python/README.md @@ -7,7 +7,7 @@ --- -### BodyCode(name) ⇒ astronomy.Body +### BodyCode(name) Finds the Body enumeration value, given the name of a body. name: str @@ -27,7 +27,7 @@ Body --- -### GeoMoon(time: astronomy.Time) ⇒ astronomy.Vector +### GeoMoon(time) Calculates the geocentric position of the Moon at a given time. Given a time of observation, calculates the Moon's position as a vector. diff --git a/source/python/astronomy.py b/source/python/astronomy.py index 468b31f6..4c12bf0c 100644 --- a/source/python/astronomy.py +++ b/source/python/astronomy.py @@ -123,7 +123,7 @@ class Body(IntEnum): Moon = 10 """The body code for the Moon.""" -def BodyCode(name) -> Body: +def BodyCode(name): """Finds the Body enumeration value, given the name of a body. Parameters @@ -2014,7 +2014,7 @@ def _CalcMoon(time): (_ARC * (_ERAD / _AU)) / (0.999953253 * SINPI) ) -def GeoMoon(time:Time) -> Vector: +def GeoMoon(time): """Calculates the geocentric position of the Moon at a given time. Given a time of observation, calculates the Moon's position as a vector.