Skip to content

Commit

Permalink
fix codestyle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
grant-nations committed Jul 19, 2023
1 parent e3bf2f5 commit b2f31a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions astroplan/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def _key(self):
>>> keck._key()
('Keck', None, None, None, <Longitude -155.47833333 deg>,
<Latitude 19.82833333 deg>, <Quantity 4160. m>,
<DstTzInfo 'US/Hawaii' LMT-1 day, 13:29:00 STD>)
<DstTzInfo 'US/Hawaii' LMT-1 day, 13:29:00 STD>)
"""

return (self.name,
Expand All @@ -311,7 +311,7 @@ def __hash__(self):
>>> from astroplan import Observer
>>> keck = Observer.at_site("Keck", timezone="US/Hawaii")
>>> hash(keck)
>>> hash(keck)
-3872382927731250571
"""

Expand Down
6 changes: 4 additions & 2 deletions astroplan/tests/test_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,7 @@ def test_observer_lon_lat_el():
for attr in ['longitude', 'latitude', 'elevation']:
assert hasattr(obs, attr)


def test_hash_observer():
"""Test that Observer objects are hashable."""
obs1 = Observer.at_site('Subaru')
Expand All @@ -1370,7 +1371,8 @@ def test_hash_observer():

obs4 = Observer.at_site('Keck', timezone='US/Hawaii')
assert hash(obs3) == hash(obs4)



def test_eq_observer():
"""Test that Observer objects are comparable."""
obs1 = Observer.at_site('Subaru')
Expand All @@ -1384,4 +1386,4 @@ def test_eq_observer():
assert obs1 != obs4

obs5 = Observer.at_site('Subaru', timezone='US/Hawaii')
assert obs4 == obs5
assert obs4 == obs5

0 comments on commit b2f31a5

Please sign in to comment.