Skip to content

Commit

Permalink
Update pillow
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed May 2, 2021
1 parent 14cfda8 commit b17a8c3
Show file tree
Hide file tree
Showing 39 changed files with 46 additions and 45 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/tests/images/preview.jpg
14 changes: 8 additions & 6 deletions app/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,26 @@ def describe_template():
def template():
t = Template.objects.get("_test")
t.clean()
return t
yield t
t.clean()

def describe_str():
def it_includes_the_path(expect, template):
expect(str(template)).endswith("/memegen/templates/_test")

def describe_valid():
@pytest.fixture(autouse=True)
def disable_hooks(monkeypatch):
def it_removes_invalid_styles(expect, template, monkeypatch):
monkeypatch.setattr(datafiles.settings, "HOOKS_ENABLED", False)

def it_removes_invalid_styles(expect, template):
template.styles = ["default", "sample", "unknown"]
with (template.directory / "sample.jpg").open("w") as f:
f.write("")
log.info(f"{template} valid: {template.valid}")
expect(template.styles) == ["default", "sample"]

def it_only_includes_default_style_with_custom_overlay(expect, template):
def it_only_includes_default_style_with_custom_overlay(
expect, template, monkeypatch
):
monkeypatch.setattr(datafiles.settings, "HOOKS_ENABLED", False)
template.styles = []
template.overlay = [Overlay()]
log.info(f"{template} valid: {template.valid}")
Expand All @@ -43,6 +44,7 @@ def it_only_includes_default_style_with_custom_overlay(expect, template):
expect(template.styles) == ["default"]

def it_skips_cleanup_when_deployed(expect, template, monkeypatch):
monkeypatch.setattr(datafiles.settings, "HOOKS_ENABLED", False)
monkeypatch.setattr(settings, "DEPLOYED", True)
template.styles = ["anything"]
log.info(f"{template} valid: {template.valid}")
Expand Down
2 changes: 1 addition & 1 deletion app/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Text:
@classmethod
def get_preview(cls) -> "Text":
return cls(
color="#80808085",
color="#80808080",
anchor_x=0.075,
anchor_y=0.05,
angle=10,
Expand Down
71 changes: 35 additions & 36 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pymdown-extensions = "^8.0"
pygments = "^2.7.0"

# Images
pillow = "^8.1.2"
pillow = "^8.2"
spongemock = "~0.3.4"

# Utilities
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ minilog==2.0; python_version >= "3.6" and python_version < "4.0"
multidict==5.1.0; python_version >= "3.6"
orderedmultidict==1.0.1
parse==1.19.0; python_version >= "3.7" and python_version < "4.0"
pillow==8.1.2; python_version >= "3.6"
pillow==8.2.0; python_version >= "3.6"
pygments==2.8.1; python_version >= "3.5"
pymdown-extensions==8.1.1; python_version >= "3.6"
pyperclip==1.8.2
Expand Down

0 comments on commit b17a8c3

Please sign in to comment.