Skip to content

Commit 7512f6b

Browse files
authored
chore: ruff errors (#271)
* fix: boltzmann wealth model network * fix: ruff errors RUF 046 and RUF 003
1 parent 4c663dd commit 7512f6b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gis/agents_and_networks/src/space/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def _segmented(linestring: LineString) -> list[LineString]:
5757
# reference: https://gis.stackexchange.com/questions/367228/using-shapely-interpolate-to-evenly-re-sample-points-on-a-linestring-geodatafram
5858
def redistribute_vertices(geom, distance):
5959
if isinstance(geom, LineString):
60-
if (num_vert := int(round(geom.length / distance))) == 0:
60+
if (num_vert := round(geom.length / distance)) == 0:
6161
num_vert = 1
6262
return LineString(
6363
[

rl/Tutorials.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"cell_type": "code",
29-
"execution_count": 1,
29+
"execution_count": null,
3030
"metadata": {},
3131
"outputs": [
3232
{
@@ -52,14 +52,14 @@
5252
],
5353
"source": [
5454
"# ### Step 1: Importing the Necessary Modules\n",
55-
"# To begin, lets import the required modules for the Epstein Civil Violence model:\n",
55+
"# To begin, let's import the required modules for the Epstein Civil Violence model:\n",
5656
"\n",
5757
"from epstein_civil_violence.model import EpsteinCivilViolenceRL\n",
5858
"from epstein_civil_violence.server import run_model\n",
5959
"from epstein_civil_violence.train_config import config\n",
6060
"from train import train_model\n",
6161
"\n",
62-
"# Heres a breakdown of the modules:\n",
62+
"# Here's a breakdown of the modules:\n",
6363
"# - `EpsteinCivilViolenceRL`: Contains the core model and environment.\n",
6464
"# - `run_model`: Configures and runs the model for inference.\n",
6565
"# - `config`: Defines the parameters for training the model.\n",
@@ -93,7 +93,7 @@
9393
"# ### Step 3: Running the Environment with Random Actions\n",
9494
"\n",
9595
"# To get a feel for how the environment operates, let's run it for a few steps using random actions.\n",
96-
"# Well sample the action space for these actions:\n",
96+
"# We'll sample the action space for these actions:\n",
9797
"\n",
9898
"for _ in range(10):\n",
9999
" action_dict = {}\n",

0 commit comments

Comments
 (0)