From 69a863c864af8b2cd2342e4bd024a03bd0cad7ef Mon Sep 17 00:00:00 2001 From: Domagoj Fijan Date: Thu, 4 Jul 2024 16:10:38 -0400 Subject: [PATCH] lint --- .../Custom-generator.ipynb | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/docs/tutorials/01-Custom-generators/Custom-generator.ipynb b/docs/tutorials/01-Custom-generators/Custom-generator.ipynb index 69b835b..9dcab22 100644 --- a/docs/tutorials/01-Custom-generators/Custom-generator.ipynb +++ b/docs/tutorials/01-Custom-generators/Custom-generator.ipynb @@ -36,12 +36,13 @@ } ], "source": [ - "import dupin as du\n", - "import gsd.hoomd\n", "import freud\n", + "import gsd.hoomd\n", "import matplotlib.pyplot as plt\n", "import ruptures as rpt\n", "\n", + "import dupin as du\n", + "\n", "ls = 6\n", "FILENAME = \"../data/lj-sim.gsd\"\n", "steinhardt = freud.order.Steinhardt(l=ls)\n", @@ -114,12 +115,13 @@ } ], "source": [ - "import dupin as du\n", - "import gsd.hoomd\n", "import freud\n", + "import gsd.hoomd\n", "import matplotlib.pyplot as plt\n", "import ruptures as rpt\n", "\n", + "import dupin as du\n", + "\n", "ls = 6\n", "FILENAME = \"../data/lj-sim.gsd\"\n", "\n", @@ -202,12 +204,13 @@ } ], "source": [ - "import dupin as du\n", - "import gsd.hoomd\n", "import freud\n", + "import gsd.hoomd\n", "import matplotlib.pyplot as plt\n", "import ruptures as rpt\n", "\n", + "import dupin as du\n", + "\n", "# Usage example\n", "ls = [6, 12]\n", "FILENAME = \"../data/lj-sim.gsd\"\n", @@ -298,15 +301,17 @@ } ], "source": [ - "import dupin as du\n", - "import gsd.hoomd\n", "import freud\n", + "import gsd.hoomd\n", "import matplotlib.pyplot as plt\n", "import ruptures as rpt\n", "\n", + "import dupin as du\n", + "\n", "ls = [6, 12]\n", "FILENAME = \"../data/lj-sim.gsd\"\n", "\n", + "\n", "# custom generator function\n", "def minkowski_generator(system):\n", " # compute voronoi neighbors and get nlist\n", @@ -318,8 +323,8 @@ " steinhardt.compute(system, neighbors=nlist)\n", " keys = [f\"M{l}\" for l in ls]\n", " properties_dict = {}\n", - " for i, keys in enumerate(keys):\n", - " properties_dict[keys] = steinhardt.particle_order.T[i]\n", + " for i, key in enumerate(keys):\n", + " properties_dict[key] = steinhardt.particle_order.T[i]\n", " return properties_dict\n", "\n", "\n",