Skip to content

Commit

Permalink
Add # noqa to quiet linter
Browse files Browse the repository at this point in the history
  • Loading branch information
somacdivad committed May 13, 2020
1 parent e30b568 commit 8954d6e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
# Putting It All Together
# -----------------------

from pathlib import Path
from PyPDF2 import PdfFileReader
from pathlib import Path # noqa
from PyPDF2 import PdfFileReader # noqa

# Change the path below to the correct path for your computer.
pdf_path = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

print(type(page))

from pathlib import Path
from pathlib import Path # noqa

with Path("blank.pdf").open(mode="wb") as output_file:
pdf_writer.write(output_file)
Expand All @@ -20,8 +20,8 @@
# Extracting a Single Page From a PDF
# -----------------------------------

from pathlib import Path
from PyPDF2 import PdfFileReader, PdfFileWriter
from pathlib import Path # noqa
from PyPDF2 import PdfFileReader, PdfFileWriter # noqa

# Change the path to work on your computer if necessary
pdf_path = (
Expand All @@ -45,8 +45,8 @@
# Extracting Multiple Pages From a PDF
# ------------------------------------

from PyPDF2 import PdfFileReader, PdfFileWriter
from pathlib import Path
from PyPDF2 import PdfFileReader, PdfFileWriter # noqa
from pathlib import Path # noqa

pdf_path = (
Path.home()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Concatenating PDFs With .append()
# ---------------------------------

from pathlib import Path
from pathlib import Path # noqa

reports_dir = (
Path.home()
Expand Down Expand Up @@ -39,8 +39,8 @@
# Merging PDFs With .merge()
# --------------------------

from pathlib import Path
from PyPDF2 import PdfFileMerger
from pathlib import Path # noqa
from PyPDF2 import PdfFileMerger # noqa

report_dir = (
Path.home()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
# Cropping Pages
# --------------

from pathlib import Path
from PyPDF2 import PdfFileReader, PdfFileWriter
from pathlib import Path # noqa
from PyPDF2 import PdfFileReader, PdfFileWriter # noqa

pdf_path = (
Path.home()
Expand Down Expand Up @@ -88,7 +88,7 @@

first_page = pdf_reader.getPage(0)

import copy
import copy # noqa

left_side = copy.deepcopy(first_page)
current_coords = left_side.mediaBox.upperRight
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
# Decrypting PDFs
# ---------------

from pathlib import Path
from PyPDF2 import PdfFileReader, PdfFileWriter
from pathlib import Path # noqa
from PyPDF2 import PdfFileReader, PdfFileWriter # noqa

pdf_path = Path.home() / "newsletter_protected.pdf"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
# Setting the Page Size
# ---------------------

from reportlab.lib.units import inch, cm
from reportlab.lib.units import inch, cm # noqa

print(cm)
print(inch)

canvas = Canvas("hello.pdf", pagesize=(8.5 * inch, 11 * inch))

from reportlab.lib.pagesizes import LETTER
from reportlab.lib.pagesizes import LETTER # noqa

canvas = Canvas("hello.pdf", pagesize=LETTER)
print(LETTER)
Expand All @@ -36,10 +36,10 @@
canvas.save()

# The code below creates a PDF with blue text
from reportlab.lib.colors import blue
from reportlab.lib.pagesizes import LETTER
from reportlab.lib.units import inch
from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.colors import blue # noqa
from reportlab.lib.pagesizes import LETTER # noqa
from reportlab.lib.units import inch # noqa
from reportlab.pdfgen.canvas import Canvas # noqa

canvas = Canvas("font-colors.pdf", pagesize=LETTER)

Expand Down

0 comments on commit 8954d6e

Please sign in to comment.