Skip to content

Commit

Permalink
fixes for typos
Browse files Browse the repository at this point in the history
  • Loading branch information
quaquel committed Sep 17, 2024
1 parent 29ee1e1 commit a90367e
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion benchmarks/BoltzmannWealth/boltzmann_wealth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""boltmann wealth model for peformance benchmarking.
"""boltmann wealth model for performance benchmarking.
https://github.com/projectmesa/mesa-examples/blob/main/examples/boltzmann_wealth_model_experimental/model.py
"""
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Schelling/schelling.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Schelling seperation for performance benchmarking."""
"""Schelling separation for performance benchmarking."""

from mesa import Model
from mesa.experimental.cell_space import CellAgent, OrthogonalMooreGrid
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/WolfSheep/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""Wolf-Sheep Predation Model for peformance benchmarking."""
"""Wolf-Sheep Predation Model for performance benchmarking."""
6 changes: 3 additions & 3 deletions benchmarks/WolfSheep/wolf_sheep.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Wolf-Sheep Predation Model for peformance benchmarking.
"""Wolf-Sheep Predation Model for performance benchmarking.
Replication of the model found in NetLogo:
Wilensky, U. (1997). NetLogo Wolf Sheep Predation model.
Expand Down Expand Up @@ -70,7 +70,7 @@ class Sheep(Animal):
"""A sheep that walks around, reproduces (asexually) and gets eaten."""

def feed(self):
"""If possibile eat the food in the current location."""
"""If possible eat the food in the current location."""
# If there is grass available, eat it
grass_patch = next(
obj for obj in self.cell.agents if isinstance(obj, GrassPatch)
Expand All @@ -84,7 +84,7 @@ class Wolf(Animal):
"""A wolf that walks around, reproduces (asexually) and eats sheep."""

def feed(self):
"""If possbile eat the food in the current location."""
"""If possible eat the food in the current location."""
sheep = [obj for obj in self.cell.agents if isinstance(obj, Sheep)]
if len(sheep) > 0:
sheep_to_eat = self.random.choice(sheep)
Expand Down
2 changes: 1 addition & 1 deletion mesa/experimental/cell_space/cell_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def select(self, filter_func: Callable[[T], bool] | None = None, n=0):
Args:
filter_func: filter function
n: number of cells to slect
n: number of cells to select
Returns:
CellCollection
Expand Down
2 changes: 1 addition & 1 deletion mesa/experimental/components/matplotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def PlotMatplotlib(model, measure, dependencies: list[any] | None = None):
Args:
model: Model instance
measure: measure to plot
dependencies: list of addtional dependencies
dependencies: list of additional dependencies
"""
fig = Figure()
Expand Down
2 changes: 1 addition & 1 deletion mesa/experimental/devs/examples/epstein_civil_violence.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __init__(self, model, vision, movement, max_jail_term):
Args:
model: a model instance
vision: size of neighborhood
movement: wether agent can move or not
movement: whether agent can move or not
max_jail_term: maximum jail sentence
"""
super().__init__(model, vision, movement)
Expand Down
4 changes: 2 additions & 2 deletions mesa/experimental/devs/examples/wolf_sheep.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, model, moore, energy, p_reproduce, energy_from_food):
"""Initialize Animal instance.
Args:
model: a model isntance
model: a model instance
moore: using moore grid or not
energy: initial energy
p_reproduce: probability of reproduction
Expand Down Expand Up @@ -112,7 +112,7 @@ def __init__(self, model, fully_grown, countdown, grass_regrowth_time):
"""Creates a new patch of grass.
Args:
model: a model isntance
model: a model instance
fully_grown: (boolean) Whether the patch of grass is fully grown or not
countdown: Time for the patch of grass to be fully grown again
grass_regrowth_time: regrowth time for the grass
Expand Down
2 changes: 1 addition & 1 deletion mesa/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def is_integer(x: Real) -> bool:


def warn_if_agent_has_position_already(placement_func):
"""Decorater to give warning if agent has position already set."""
"""Decorator to give warning if agent has position already set."""

def wrapper(self, agent, *args, **kwargs):
if agent.pos is not None:
Expand Down

0 comments on commit a90367e

Please sign in to comment.