Browse Source

chore: format

Byaidu 1 year ago
parent
commit
583d6b3bc9
3 changed files with 3 additions and 3 deletions
  1. 1 1
      pdf2zh/converter.py
  2. 1 1
      pdf2zh/high_level.py
  3. 1 1
      setup.cfg

+ 1 - 1
pdf2zh/converter.py

@@ -51,7 +51,7 @@ class PDFConverterEx(PDFConverter):
         self._stack.append(self.cur_item)
         self.cur_item = LTFigure(name, bbox, mult_matrix(matrix, self.ctm))
         self.cur_item.pageid = self._stack[-1].pageid
-    
+
     def end_figure(self, _: str) -> None:
         fig = self.cur_item
         assert isinstance(self.cur_item, LTFigure), str(type(self.cur_item))

+ 1 - 1
pdf2zh/high_level.py

@@ -67,7 +67,7 @@ def extract_text_to_fp(
         total=total_pages,
     ) as progress:
         for pageno, page in progress:
-            if pages and (not pageno in pages):
+            if pages and (pageno not in pages):
                 continue
             if callback:
                 callback(progress)

+ 1 - 1
setup.cfg

@@ -1,4 +1,4 @@
 [flake8]
 max-line-length = 120
-ignore = E203,W503,E261
+ignore = E203,E261,E501,W503,E741
 exclude = .git,build,dist,docs