Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Dec 12, 2018
1 parent 4499f74 commit fa4bf20
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 75 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ background = "*"
markdown = "<3"
minilog = "*"
pillow = "~=4.1.1"
profanityfilter = "~=1.1.2"
profanityfilter = "~=2.0.5"
pymdown-extensions = "<6"
requests = "~=2.20.0"
webargs = "~=1.7.0"
Expand Down
148 changes: 76 additions & 72 deletions Pipfile.lock

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

7 changes: 5 additions & 2 deletions memegen/routes/_cache.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import yorm
from yorm.types import List, Object
import profanityfilter
from profanityfilter import ProfanityFilter
import log

profanity_filter = ProfanityFilter()
profanity_filter.remove_word("damn")


@yorm.attr(items=List.of_type(Object))
@yorm.sync("data/cache/{self.name}.yml", auto_resolve=True)
Expand Down Expand Up @@ -55,7 +58,7 @@ def _skip_cache(self, kwargs):
if kwargs['key'] == 'custom' or kwargs.get('alt'):
log.debug("Skipped caching of custom background: %s", kwargs)
return True
if profanityfilter.is_profane(kwargs['path']):
if profanity_filter.is_profane(kwargs['path']):
log.debug("Skipped caching of profane content: %s", kwargs)
return True

Expand Down

0 comments on commit fa4bf20

Please sign in to comment.