refactor: Clean up setup file
This commit is contained in:
parent
25f82e966c
commit
6afe4809f2
3 changed files with 15 additions and 13 deletions
|
|
@ -22,6 +22,11 @@ repos:
|
|||
- id: black
|
||||
additional_dependencies: ['click==8.0.4']
|
||||
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 5.9.1
|
||||
hooks:
|
||||
- id: isort
|
||||
|
||||
- repo: https://gitlab.com/pycqa/flake8
|
||||
rev: 3.9.2
|
||||
hooks:
|
||||
|
|
@ -30,13 +35,6 @@ repos:
|
|||
'flake8-bugbear',
|
||||
]
|
||||
args: ['--config', '.github/helper/flake8.conf']
|
||||
exclude: ".*setup.py$"
|
||||
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 5.9.1
|
||||
hooks:
|
||||
- id: isort
|
||||
exclude: ".*setup.py$"
|
||||
|
||||
ci:
|
||||
autoupdate_schedule: weekly
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ class Identicon(object):
|
|||
if format.upper() not in Image.SAVE:
|
||||
Image.init()
|
||||
save_handler = Image.SAVE[format.upper()]
|
||||
save_handler(self.image, fp, "")
|
||||
fp.seek(0)
|
||||
return "data:image/png;base64,{0}".format(base64.b64encode(fp.read()))
|
||||
try:
|
||||
save_handler(self.image, fp, "")
|
||||
finally:
|
||||
fp.seek(0)
|
||||
return "data:image/png;base64,{0}".format(base64.b64encode(fp.read()))
|
||||
|
|
|
|||
8
setup.py
8
setup.py
|
|
@ -1,9 +1,11 @@
|
|||
# imports - standard imports
|
||||
import os, shutil
|
||||
import ast
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
from distutils.command.clean import clean as Clean
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
import re, ast
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
# get version from __version__ variable in frappe/__init__.py
|
||||
_version_re = re.compile(r"__version__\s+=\s+(.*)")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue