Skip to content

Commit f3f98ee

Browse files
authored
Fix pre-commit issues: Codespel and typecheck (#2161)
Fixes two things pre-commit detected: - Some codespell errors - A case of E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
1 parent 0f3fe74 commit f3f98ee

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.codespellignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ inactivate
66
ue
77
fpr
88
falsy
9+
assertIn

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
We as members, contributors, and leaders pledge to make participation in our
66
community a harassment-free experience for everyone, regardless of age, body
77
size, visible or invisible disability, ethnicity, sex characteristics, gender
8-
identity and expression, level of experience, education, socio-economic status,
8+
identity and expression, level of experience, education, socioeconomic status,
99
nationality, personal appearance, race, caste, color, religion, or sexual
1010
identity and orientation.
1111

docs/tutorials/adv_tutorial_legacy.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
"\n",
159159
"![Redcircles Visualization](files/viz_redcircles.png)\n",
160160
"\n",
161-
"Click `Step` to advance the model by one step, and the agents will move around. Click `Start` and the agents will keep moving around, at the rate set by the 'fps' (frames per second) slider at the top. Try moving it around and see how the speed of the model changes. Pressing `Stop` will pause the model; presing `Start` again will restart it. Finally, `Reset` will start a new instantiation of the model.\n",
161+
"Click `Step` to advance the model by one step, and the agents will move around. Click `Start` and the agents will keep moving around, at the rate set by the 'fps' (frames per second) slider at the top. Try moving it around and see how the speed of the model changes. Pressing `Stop` will pause the model; pressing `Start` again will restart it. Finally, `Reset` will start a new instantiation of the model.\n",
162162
"\n",
163163
"To stop the visualization server, go back to the terminal where you launched it, and press Control+c."
164164
]

mesa/visualization/UserParam.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(
4747
if dtype is None:
4848
self.is_float_slider = self._check_values_are_float(value, min, max, step)
4949
else:
50-
self.is_float_slider = dtype == float
50+
self.is_float_slider = dtype is float
5151

5252
def _check_values_are_float(self, value, min, max, step):
5353
return any(isinstance(n, float) for n in (value, min, max, step))

0 commit comments

Comments
 (0)