Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
helgee committed Jan 16, 2024
1 parent 0b8b4d8 commit e8513eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions crates/lox_py/lox_space.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ class Sun:

def equatorial_radius(self) -> float: ...

class Barycenter:
def __init__(self, name: str): ...

def id(self) -> int: ...

def name(self) -> str: ...

def gravitational_parameter(self) -> float: ...

class Planet:
def __init__(self, name: str): ...

Expand Down
6 changes: 3 additions & 3 deletions crates/lox_py/src/bodies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl PyBarycenter {
}

fn __repr__(&self) -> PyResult<String> {
Ok(format!("MinorBody(\"{}\")", self.name()))
Ok(format!("Barycenter(\"{}\")", self.name()))
}

fn __str__(&self) -> PyResult<String> {
Expand Down Expand Up @@ -130,7 +130,7 @@ impl PyPlanet {
}

fn __repr__(&self) -> PyResult<String> {
Ok(format!("MinorBody(\"{}\")", self.name()))
Ok(format!("Planet(\"{}\")", self.name()))
}

fn __str__(&self) -> PyResult<String> {
Expand Down Expand Up @@ -219,7 +219,7 @@ impl PySatellite {
}

fn __repr__(&self) -> PyResult<String> {
Ok(format!("MinorBody(\"{}\")", self.name()))
Ok(format!("Satellite(\"{}\")", self.name()))
}

fn __str__(&self) -> PyResult<String> {
Expand Down

0 comments on commit e8513eb

Please sign in to comment.