diff --git a/examples/bank_reserves/bank_reserves/model.py b/examples/bank_reserves/bank_reserves/model.py index 92be1c419b1..ec24db49979 100644 --- a/examples/bank_reserves/bank_reserves/model.py +++ b/examples/bank_reserves/bank_reserves/model.py @@ -26,7 +26,7 @@ def get_num_rich_agents(model): - """ return number of rich agents""" + """return number of rich agents""" rich_agents = [a for a in model.schedule.agents if a.savings > model.rich_threshold] return len(rich_agents) diff --git a/examples/boltzmann_wealth_model/boltzmann_wealth_model/model.py b/examples/boltzmann_wealth_model/boltzmann_wealth_model/model.py index f8eeec1ef6b..d7ad78324ea 100644 --- a/examples/boltzmann_wealth_model/boltzmann_wealth_model/model.py +++ b/examples/boltzmann_wealth_model/boltzmann_wealth_model/model.py @@ -50,7 +50,7 @@ def run_model(self, n): class MoneyAgent(Agent): - """ An agent with fixed initial wealth.""" + """An agent with fixed initial wealth.""" def __init__(self, unique_id, model): super().__init__(unique_id, model) diff --git a/examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/model.py b/examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/model.py index 7737ad5034f..0d996ca4dbd 100644 --- a/examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/model.py +++ b/examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/model.py @@ -52,7 +52,7 @@ def run_model(self, n): class MoneyAgent(Agent): - """ An agent with fixed initial wealth.""" + """An agent with fixed initial wealth.""" def __init__(self, unique_id, model): super().__init__(unique_id, model) diff --git a/examples/charts/charts/model.py b/examples/charts/charts/model.py index e325af499a1..394e18205eb 100644 --- a/examples/charts/charts/model.py +++ b/examples/charts/charts/model.py @@ -26,7 +26,7 @@ def get_num_rich_agents(model): - """ return number of rich agents""" + """return number of rich agents""" rich_agents = [a for a in model.schedule.agents if a.savings > model.rich_threshold] return len(rich_agents) diff --git a/examples/pd_grid/pd_grid/agent.py b/examples/pd_grid/pd_grid/agent.py index c923d3fc4b1..a8985b2a78a 100644 --- a/examples/pd_grid/pd_grid/agent.py +++ b/examples/pd_grid/pd_grid/agent.py @@ -2,7 +2,7 @@ class PDAgent(Agent): - """ Agent member of the iterated, spatial prisoner's dilemma model. """ + """Agent member of the iterated, spatial prisoner's dilemma model.""" def __init__(self, pos, model, starting_move=None): """ @@ -28,7 +28,7 @@ def isCooroperating(self): return self.move == "C" def step(self): - """ Get the neighbors' moves, and change own move accordingly. """ + """Get the neighbors' moves, and change own move accordingly.""" neighbors = self.model.grid.get_neighbors(self.pos, True, include_center=True) best_neighbor = max(neighbors, key=lambda a: a.score) self.next_move = best_neighbor.move diff --git a/examples/pd_grid/pd_grid/model.py b/examples/pd_grid/pd_grid/model.py index 01f02b9772d..9bba389867e 100644 --- a/examples/pd_grid/pd_grid/model.py +++ b/examples/pd_grid/pd_grid/model.py @@ -7,7 +7,7 @@ class PdGrid(Model): - """ Model class for iterated, spatial prisoner's dilemma model. """ + """Model class for iterated, spatial prisoner's dilemma model.""" schedule_types = { "Sequential": BaseScheduler, @@ -60,6 +60,6 @@ def step(self): self.datacollector.collect(self) def run(self, n): - """ Run the model for n steps. """ + """Run the model for n steps.""" for _ in range(n): self.step() diff --git a/examples/schelling/model.py b/examples/schelling/model.py index bcb7f5c4ad1..a2ca410bb6f 100644 --- a/examples/schelling/model.py +++ b/examples/schelling/model.py @@ -41,7 +41,7 @@ class Schelling(Model): """ def __init__(self, height=20, width=20, density=0.8, minority_pc=0.2, homophily=3): - """""" + """ """ self.height = height self.width = width