Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

Commit 85ff38d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b49115a commit 85ff38d

8 files changed

Lines changed: 722 additions & 744 deletions

docs/source/notebooks/astropy-units-completed.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"\n",
4242
"import sys\n",
4343
"\n",
44-
"if 'google.colab' in str(get_ipython()):\n",
45-
" if 'plasmapy' not in sys.modules:\n",
44+
"if \"google.colab\" in str(get_ipython()):\n",
45+
" if \"plasmapy\" not in sys.modules:\n",
4646
" !pip install astropy matplotlib numpy\n",
4747
"\n",
4848
"import astropy.units as u\n",

docs/source/notebooks/particles-formulary-completed.ipynb

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"source": [
3636
"import sys\n",
3737
"\n",
38-
"if 'google.colab' in str(get_ipython()):\n",
39-
" if 'plasmapy' not in sys.modules:\n",
38+
"if \"google.colab\" in str(get_ipython()):\n",
39+
" if \"plasmapy\" not in sys.modules:\n",
4040
" !pip install plasmapy==2024.7.0\n",
4141
"\n",
4242
"import astropy.units as u\n",
@@ -983,7 +983,7 @@
983983
"outputs": [],
984984
"source": [
985985
"B_corona = 50 * u.G\n",
986-
"n_corona = 1e9 * u.cm ** -3\n",
986+
"n_corona = 1e9 * u.cm**-3\n",
987987
"T_corona = 1 * u.MK"
988988
]
989989
},
@@ -1030,7 +1030,7 @@
10301030
"source": [
10311031
"T_photosphere = 5800 * u.K\n",
10321032
"B_photosphere = 400 * u.G\n",
1033-
"n_photosphere = 1e17 * u.cm ** -3"
1033+
"n_photosphere = 1e17 * u.cm**-3"
10341034
]
10351035
},
10361036
{
@@ -1117,7 +1117,7 @@
11171117
"metadata": {},
11181118
"outputs": [],
11191119
"source": [
1120-
"n = 1 * u.cm ** -3\n",
1120+
"n = 1 * u.cm**-3\n",
11211121
"B = 5 * u.nT\n",
11221122
"T = 30000 * u.K"
11231123
]
@@ -1432,12 +1432,11 @@
14321432
"outputs": [],
14331433
"source": [
14341434
"def return_function():\n",
1435-
"\n",
14361435
" print(\"Defining inner_function...\")\n",
1437-
" \n",
1438-
" def inner_function(): \n",
1436+
"\n",
1437+
" def inner_function():\n",
14391438
" print(\"Calling inner_function!\")\n",
1440-
" \n",
1439+
"\n",
14411440
" return inner_function"
14421441
]
14431442
},
@@ -1530,9 +1529,7 @@
15301529
"outputs": [],
15311530
"source": [
15321531
"def decorator(function: Callable):\n",
1533-
" \n",
15341532
" def decorated_function() -> None:\n",
1535-
"\n",
15361533
" print(\"Before calling the function.\")\n",
15371534
" result = function()\n",
15381535
" print(\"After calling the function.\")\n",
@@ -2273,7 +2270,7 @@
22732270
"@validate_quantities\n",
22742271
"def alfven_speed(\n",
22752272
" B: u.Quantity[u.T],\n",
2276-
" n: u.Quantity[u.m**-3], \n",
2273+
" n: u.Quantity[u.m**-3],\n",
22772274
" ion: ParticleLike,\n",
22782275
") -> u.Quantity[u.m / u.s]:\n",
22792276
" \"\"\"Return the Alfvén speed.\"\"\"\n",
@@ -2293,7 +2290,7 @@
22932290
},
22942291
"outputs": [],
22952292
"source": [
2296-
"alfven_speed(B = 0.02 * u.T, n = 1e15 * u.m**-3, ion=\"p+\")"
2293+
"alfven_speed(B=0.02 * u.T, n=1e15 * u.m**-3, ion=\"p+\")"
22972294
]
22982295
}
22992296
],

notebooks/astropy-units-completed.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"\n",
4242
"import sys\n",
4343
"\n",
44-
"if 'google.colab' in str(get_ipython()):\n",
45-
" if 'plasmapy' not in sys.modules:\n",
44+
"if \"google.colab\" in str(get_ipython()):\n",
45+
" if \"plasmapy\" not in sys.modules:\n",
4646
" !pip install astropy matplotlib numpy\n",
4747
"\n",
4848
"import astropy.units as u\n",

notebooks/astropy-units.ipynb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,9 @@
4141
"\n",
4242
"import sys\n",
4343
"\n",
44-
"if 'google.colab' in str(get_ipython()):\n",
45-
" if 'plasmapy' not in sys.modules:\n",
46-
" !pip install astropy matplotlib numpy\n",
47-
"\n",
48-
"import astropy.units as u\n",
49-
"from astropy.visualization import quantity_support\n",
50-
"from astropy import constants\n",
51-
"import matplotlib.pyplot as plt\n",
52-
"import numpy as np"
44+
"if \"google.colab\" in str(get_ipython()):\n",
45+
" if \"plasmapy\" not in sys.modules:\n",
46+
" !pip install astropy matplotlib numpy"
5347
]
5448
},
5549
{

notebooks/dispersion_solver_complete.ipynb

Lines changed: 683 additions & 684 deletions
Large diffs are not rendered by default.

notebooks/new.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"source": [
3030
"import sys\n",
3131
"\n",
32-
"if 'google.colab' in str(get_ipython()):\n",
33-
" if 'plasmapy' not in sys.modules:\n",
32+
"if \"google.colab\" in str(get_ipython()):\n",
33+
" if \"plasmapy\" not in sys.modules:\n",
3434
" !pip install plasmapy==2024.7.0 matplotlib numpy astropy\n",
3535
"\n",
3636
"from plasmapy.particles import *\n",

notebooks/particles-formulary-completed.ipynb

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"source": [
3636
"import sys\n",
3737
"\n",
38-
"if 'google.colab' in str(get_ipython()):\n",
39-
" if 'plasmapy' not in sys.modules:\n",
38+
"if \"google.colab\" in str(get_ipython()):\n",
39+
" if \"plasmapy\" not in sys.modules:\n",
4040
" !pip install plasmapy==2024.7.0\n",
4141
"\n",
4242
"import astropy.units as u\n",
@@ -984,7 +984,7 @@
984984
"outputs": [],
985985
"source": [
986986
"B_corona = 50 * u.G\n",
987-
"n_corona = 1e9 * u.cm ** -3\n",
987+
"n_corona = 1e9 * u.cm**-3\n",
988988
"T_corona = 1 * u.MK"
989989
]
990990
},
@@ -1031,7 +1031,7 @@
10311031
"source": [
10321032
"T_photosphere = 5800 * u.K\n",
10331033
"B_photosphere = 400 * u.G\n",
1034-
"n_photosphere = 1e17 * u.cm ** -3"
1034+
"n_photosphere = 1e17 * u.cm**-3"
10351035
]
10361036
},
10371037
{
@@ -1118,7 +1118,7 @@
11181118
"metadata": {},
11191119
"outputs": [],
11201120
"source": [
1121-
"n = 1 * u.cm ** -3\n",
1121+
"n = 1 * u.cm**-3\n",
11221122
"B = 5 * u.nT\n",
11231123
"T = 30000 * u.K"
11241124
]
@@ -1432,12 +1432,11 @@
14321432
"outputs": [],
14331433
"source": [
14341434
"def return_function():\n",
1435-
"\n",
14361435
" print(\"Defining inner_function...\")\n",
1437-
" \n",
1438-
" def inner_function(): \n",
1436+
"\n",
1437+
" def inner_function():\n",
14391438
" print(\"Calling inner_function!\")\n",
1440-
" \n",
1439+
"\n",
14411440
" return inner_function"
14421441
]
14431442
},
@@ -1530,9 +1529,7 @@
15301529
"outputs": [],
15311530
"source": [
15321531
"def decorator(function: Callable):\n",
1533-
" \n",
15341532
" def decorated_function() -> None:\n",
1535-
"\n",
15361533
" print(\"Before calling the function.\")\n",
15371534
" result = function()\n",
15381535
" print(\"After calling the function.\")\n",
@@ -2272,7 +2269,7 @@
22722269
"@validate_quantities\n",
22732270
"def alfven_speed(\n",
22742271
" B: u.Quantity[u.T],\n",
2275-
" n: u.Quantity[u.m**-3], \n",
2272+
" n: u.Quantity[u.m**-3],\n",
22762273
" ion: ParticleLike,\n",
22772274
") -> u.Quantity[u.m / u.s]:\n",
22782275
" \"\"\"Return the Alfvén speed.\"\"\"\n",
@@ -2292,7 +2289,7 @@
22922289
},
22932290
"outputs": [],
22942291
"source": [
2295-
"alfven_speed(B = 0.02 * u.T, n = 1e15 * u.m**-3, ion=\"p+\")"
2292+
"alfven_speed(B=0.02 * u.T, n=1e15 * u.m**-3, ion=\"p+\")"
22962293
]
22972294
}
22982295
],

notebooks/particles-formulary.ipynb

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,13 @@
3535
"source": [
3636
"import sys\n",
3737
"\n",
38-
"if 'google.colab' in str(get_ipython()):\n",
39-
" if 'plasmapy' not in sys.modules:\n",
38+
"if \"google.colab\" in str(get_ipython()):\n",
39+
" if \"plasmapy\" not in sys.modules:\n",
4040
" !pip install plasmapy==2024.7.0\n",
4141
"\n",
4242
"import astropy.units as u\n",
43-
"import numpy as np\n",
4443
"from plasmapy.particles import *\n",
45-
"from plasmapy.particles.particle_class import valid_categories\n",
46-
"from plasmapy.formulary import *\n",
47-
"from plasmapy.utils.decorators import validate_quantities"
44+
"from plasmapy.formulary import *"
4845
]
4946
},
5047
{
@@ -890,7 +887,7 @@
890887
"outputs": [],
891888
"source": [
892889
"B_corona = 50 * u.G\n",
893-
"n_corona = 1e9 * u.cm ** -3\n",
890+
"n_corona = 1e9 * u.cm**-3\n",
894891
"T_corona = 1 * u.MK"
895892
]
896893
},
@@ -935,7 +932,7 @@
935932
"source": [
936933
"T_photosphere = 5800 * u.K\n",
937934
"B_photosphere = 400 * u.G\n",
938-
"n_photosphere = 1e17 * u.cm ** -3"
935+
"n_photosphere = 1e17 * u.cm**-3"
939936
]
940937
},
941938
{
@@ -1020,7 +1017,7 @@
10201017
"metadata": {},
10211018
"outputs": [],
10221019
"source": [
1023-
"n = 1 * u.cm ** -3\n",
1020+
"n = 1 * u.cm**-3\n",
10241021
"B = 5 * u.nT\n",
10251022
"T = 30000 * u.K"
10261023
]
@@ -1307,12 +1304,11 @@
13071304
"outputs": [],
13081305
"source": [
13091306
"def return_function():\n",
1310-
"\n",
13111307
" print(\"Defining inner_function...\")\n",
1312-
" \n",
1313-
" def inner_function(): \n",
1308+
"\n",
1309+
" def inner_function():\n",
13141310
" print(\"Calling inner_function!\")\n",
1315-
" \n",
1311+
"\n",
13161312
" return inner_function"
13171313
]
13181314
},
@@ -1394,9 +1390,7 @@
13941390
"outputs": [],
13951391
"source": [
13961392
"def decorator(function: Callable):\n",
1397-
" \n",
13981393
" def decorated_function() -> None:\n",
1399-
"\n",
14001394
" print(\"Before calling the function.\")\n",
14011395
" result = function()\n",
14021396
" print(\"After calling the function.\")\n",
@@ -1588,10 +1582,7 @@
15881582
"metadata": {},
15891583
"outputs": [],
15901584
"source": [
1591-
"import astropy.units as u\n",
1592-
"from astropy import constants\n",
1593-
"from plasmapy.utils.decorators import check_relativistic\n",
1594-
"from plasmapy.particles import particle_input"
1585+
"import astropy.units as u"
15951586
]
15961587
},
15971588
{

0 commit comments

Comments
 (0)