Skip to content

Commit

Permalink
Merge pull request #62 from CybercentreCanada/update/vscode-stylings
Browse files Browse the repository at this point in the history
Updating code styles in vscode [dev]
  • Loading branch information
cccs-kevin authored May 29, 2023
2 parents bf37748 + 67220f7 commit d98594b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 11 deletions.
38 changes: 38 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
"editor.formatOnSave": true,
"editor.rulers": [
120
],
"editor.tabSize": 4,
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"isort.args": [
"-l",
"120",
"--profile=black",
// "--src=${workspaceFolder}"
],
"python.formatting.autopep8Args": [
"--max-line-length",
"120",
"--experimental"
],
"python.formatting.provider": "autopep8",
"python.formatting.blackArgs": [
"--line-length=120"
],
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
"--max-line-length=120",
//Added the ignore of E203 for now : https://github.com/PyCQA/pycodestyle/issues/373
"--ignore=E203,W503"
],
"python.linting.pylintEnabled": false,
}
10 changes: 4 additions & 6 deletions document_preview/document_preview.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import os
import subprocess
import tempfile

from natsort import natsorted
from pdf2image import convert_from_path
from time import time

from assemblyline_v4_service.common.base import ServiceBase
from assemblyline_v4_service.common.result import Result, ResultImageSection
from assemblyline_v4_service.common.request import ServiceRequest as Request
from assemblyline_v4_service.common.helper import get_service_manifest

from assemblyline_v4_service.common.request import ServiceRequest as Request
from assemblyline_v4_service.common.result import Result, ResultImageSection
from document_preview.helper.emlrender import processEml as eml2image
from natsort import natsorted
from pdf2image import convert_from_path


class DocumentPreview(ServiceBase):
Expand Down
9 changes: 5 additions & 4 deletions document_preview/helper/emlrender.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
# - "offline" mode when rendering HTML code
#

import os
import sys
import base64
import email
import email.header
import os
import quopri
import base64
import regex
import sys
from tempfile import NamedTemporaryFile

import regex

try:
import imgkit
except:
Expand Down
1 change: 0 additions & 1 deletion document_preview/helper/outlookmsgfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import os
import re
import sys

from email.utils import formataddr, formatdate, parsedate_to_datetime
from functools import reduce

Expand Down

0 comments on commit d98594b

Please sign in to comment.