Skip to content

Commit 4b78978

Browse files
author
John Lyu
committed
lint
1 parent e057912 commit 4b78978

File tree

14 files changed

+21
-27
lines changed

14 files changed

+21
-27
lines changed

dataframe_image/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from ._convert import convert
22
from ._pandas_accessor import export, export_async
33
from ._version import __version__
4+
5+
__all__ = ["export", "export_async", "convert", "__version__"]

dataframe_image/_browser_pdf.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
import os
66
import platform
77
import socket
8-
import urllib.parse
98
from pathlib import Path
109
from subprocess import Popen
11-
from tempfile import TemporaryDirectory, mkstemp
10+
from tempfile import mkstemp
1211

1312
import aiohttp
14-
from nbconvert import TemplateExporter
15-
from nbconvert.exporters import Exporter, HTMLExporter
13+
from nbconvert.exporters import HTMLExporter
1614

1715
from .converter.browser.chrome_converter import get_chrome_path
1816

@@ -141,7 +139,7 @@ def get_pdf_data(file_name):
141139

142140

143141
def get_pdf_data_chromecontroller(file_name):
144-
import ChromeController
142+
import ChromeController # type: ignore
145143

146144
additional_options = get_launch_args()
147145
# ChromeContext will shlex.split binary, so add quote to it
@@ -150,10 +148,10 @@ def get_pdf_data_chromecontroller(file_name):
150148
) as cr:
151149
# Do a blocking navigate to a URL, and get the page content as served by the remote
152150
# server, with no modification by local javascript (if applicable)
153-
raw_source = cr.blocking_navigate_and_get_source(file_name)
151+
# raw_source = cr.blocking_navigate_and_get_source(file_name)
154152
# Since the page is now rendered by the blocking navigate, we can
155153
# get the page source after any javascript has modified it.
156-
rendered_source = cr.get_rendered_page_source()
154+
# rendered_source = cr.get_rendered_page_source()
157155
# # Or take a screenshot
158156
# # The screenshot is the size of the remote browser's configured viewport,
159157
# # which by default is set to 1024 * 1366. This size can be changed via the

dataframe_image/_bundler.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import base64
2-
import json
32
from pathlib import Path
43

5-
from tornado import gen
64

75

86
def _jupyter_bundlerextension_paths():

dataframe_image/_convert.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import base64
21
import io
32
import logging
43
import os
5-
import re
64
import shutil
7-
import tempfile
8-
import time
95
import urllib.parse
106
import warnings
117
from pathlib import Path

dataframe_image/_latex_pdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import shutil
22

3-
from nbconvert.exporters import Exporter, HTMLExporter, PDFExporter
3+
from nbconvert.exporters import PDFExporter
44

55
from ._preprocessors import (
66
ChangeOutputTypePreprocessor,

dataframe_image/_preprocessors.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import base64
2-
import io
32
import re
43
from pathlib import Path
54

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .browser import *
1+
from .browser import * # noqa: F403

dataframe_image/converter/browser/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@
22
from .html2image_converter import Html2ImageConverter
33
from .playwright_converter import AsyncPlayWrightConverter, PlayWrightConverter
44
from .selenium_converter import SeleniumConverter
5+
6+
__all__ = [
7+
"ChromeConverter",
8+
"Html2ImageConverter",
9+
"PlayWrightConverter",
10+
"AsyncPlayWrightConverter",
11+
"SeleniumConverter",
12+
]

dataframe_image/converter/browser/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import base64
22
import io
33
import logging
4-
import subprocess
54
from abc import ABC
65
from pathlib import Path
7-
from tempfile import TemporaryDirectory
86

97
import numpy as np
108
from PIL import Image, ImageOps

dataframe_image/converter/browser/playwright_converter.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import math
22
from io import BytesIO
3-
from pathlib import Path
4-
from tempfile import TemporaryDirectory
53

64
from PIL import Image
75

0 commit comments

Comments
 (0)