Move to ruff, its faster & catches more

This commit is contained in:
Timothy Hobbs
2023-11-14 20:07:25 +01:00
parent d09c35a881
commit 6cd5522099
14 changed files with 15 additions and 51 deletions

View File

@ -28,7 +28,7 @@ def validate_file_extension(value):
valid_extensions = ['.txt', '.asc', '.htm', '.html',
'.pdf', '.doc', '.docx', '.odt', '.jpg', '.png', '.eml']
if not ext.lower() in valid_extensions:
if ext.lower() not in valid_extensions:
# TODO: one more check in case it is a file with no extension; we
# should always allow that?
if not (ext.lower() == '' or ext.lower() == '.'):