Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#3308)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.9.0 → v3.10.1](asottile/pyupgrade@v3.9.0...v3.10.1)
- [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](PyCQA/flake8@6.0.0...6.1.0)

* fixed flake8 E721

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tristan Schulz <[email protected]>
Co-authored-by: Benjamin Hackl <[email protected]>
  • Loading branch information
3 people authored Aug 9, 2023
1 parent 82e55b5 commit 88836df
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
name: isort (pyi)
types: [pyi]
- repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
rev: v3.10.1
hooks:
- id: pyupgrade
name: Update code to new python versions
Expand All @@ -44,7 +44,7 @@ repos:
- id: blacken-docs
additional_dependencies: [black==22.3.0]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion manim/mobject/opengl/opengl_image_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(
):
self.image = filename_or_array
self.resampling_algorithm = resampling_algorithm
if type(filename_or_array) == np.ndarray:
if isinstance(filename_or_array, np.ndarray):
self.size = self.image.shape[1::-1]
elif isinstance(filename_or_array, (str, Path)):
path = get_full_raster_image_path(filename_or_array)
Expand Down
2 changes: 1 addition & 1 deletion manim/mobject/opengl/opengl_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def __init__(

if not isinstance(uv_surface, OpenGLSurface):
raise Exception("uv_surface must be of type OpenGLSurface")
if type(image_file) == np.ndarray:
if isinstance(image_file, np.ndarray):
image_file = change_to_rgba_array(image_file)

# Set texture information
Expand Down
2 changes: 1 addition & 1 deletion manim/mobject/svg/svg_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def get_mobjects_from(self, svg: se.SVG) -> list[VMobject]:
mob = self.polyline_to_mobject(shape)
elif isinstance(shape, se.Text):
mob = self.text_to_mobject(shape)
elif isinstance(shape, se.Use) or type(shape) == se.SVGElement:
elif isinstance(shape, se.Use) or type(shape) is se.SVGElement:
continue
else:
logger.warning(f"Unsupported element type: {type(shape)}")
Expand Down

0 comments on commit 88836df

Please sign in to comment.