Skip to content

Commit

Permalink
Chore: Satisfy linter admonition flake8 E721
Browse files Browse the repository at this point in the history
The admonition was: E721 do not compare types, for exact checks use
`is` / `is not`, for instance checks use `isinstance()`.

Apparently, it has been added to flake8 6.1.0, released on July 29, 2023
  • Loading branch information
amotl committed Jul 31, 2023
1 parent 9919250 commit d2d44a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crate/testing/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def __init__(self,
transport_port or '4300-4399',
settings)
# ES 5 cannot parse 'True'/'False' as booleans so convert to lowercase
start_cmd = (crate_exec, ) + tuple(["-C%s=%s" % ((key, str(value).lower()) if type(value) == bool else (key, value))
start_cmd = (crate_exec, ) + tuple(["-C%s=%s" % ((key, str(value).lower()) if isinstance(value, bool) else (key, value))
for key, value in settings.items()])

self._wd = wd = os.path.join(CrateLayer.tmpdir, 'crate_layer', name)
Expand Down

0 comments on commit d2d44a5

Please sign in to comment.