Skip to content

Commit

Permalink
lint with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
vulpes2 committed Jul 23, 2024
1 parent 3e30701 commit 740545a
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 23 deletions.
3 changes: 2 additions & 1 deletion brother_ql/backends/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* printing
"""

import logging, time
import logging
import time

from brother_ql.backends import backend_factory, guess_backend
from brother_ql.reader import interpret_response
Expand Down
5 changes: 4 additions & 1 deletion brother_ql/backends/linux_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
Works on Linux.
"""

import glob, os, time, select
import glob
import os
import time
import select

from .generic import BrotherQLBackendGeneric

Expand Down
4 changes: 3 additions & 1 deletion brother_ql/backends/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
Works cross-platform.
"""

import socket, time, select
import socket
import time
import select

from .generic import BrotherQLBackendGeneric

Expand Down
4 changes: 3 additions & 1 deletion brother_ql/brother_ql_analyse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python

import sys, argparse, logging
import sys
import argparse
import logging

from brother_ql.reader import BrotherQLReader

Expand Down
4 changes: 3 additions & 1 deletion brother_ql/brother_ql_create.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python

import sys, argparse, logging
import sys
import argparse
import logging

from brother_ql.raster import BrotherQLRaster
from brother_ql.conversion import convert
Expand Down
5 changes: 3 additions & 2 deletions brother_ql/brother_ql_debug.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python

import sys, argparse, logging, struct, io, logging, sys, os, time
from pprint import pprint, pformat
import argparse
import logging
import time

from brother_ql.reader import (
OPCODES,
Expand Down
6 changes: 4 additions & 2 deletions brother_ql/brother_ql_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
Testing the packaged version of the Linux Kernel backend
"""

import argparse, logging, sys
import argparse
import logging
import sys

from brother_ql.backends import backend_factory, guess_backend, available_backends
from brother_ql.backends import guess_backend, available_backends
from brother_ql.backends.helpers import discover, send
from brother_ql.output_helpers import (
log_discovered_devices,
Expand Down
12 changes: 5 additions & 7 deletions brother_ql/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@
from brother_ql.devicedependent import (
models,
label_sizes,
label_type_specs,
DIE_CUT_LABEL,
ENDLESS_LABEL,
ROUND_DIE_CUT_LABEL,
)
from brother_ql.backends import available_backends, backend_factory
from brother_ql.backends import available_backends


logger = logging.getLogger("brother_ql")
Expand Down Expand Up @@ -114,8 +110,10 @@ def env(ctx, *args, **kwargs):
"""
print debug info about running environment
"""
import sys, platform, os, shutil
from pkg_resources import get_distribution, working_set
import sys
import platform
import shutil
from pkg_resources import get_distribution

print("\n##################\n")
print("Information about the running environment of brother_ql.")
Expand Down
3 changes: 2 additions & 1 deletion brother_ql/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import logging

from PIL import Image
import PIL.ImageOps, PIL.ImageChops
import PIL.ImageOps
import PIL.ImageChops

from brother_ql.devicedependent import (
ENDLESS_LABEL,
Expand Down
1 change: 0 additions & 1 deletion brother_ql/image_trafos.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from PIL import Image
import colorsys


def filtered_hsv(im, filter_h, filter_s, filter_v, default_col=(255, 255, 255)):
Expand Down
4 changes: 0 additions & 4 deletions brother_ql/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@

import packbits
from PIL import Image
import io

from brother_ql.models import ModelsManager
from .devicedependent import (
models,
min_max_feed,
min_max_length_dots,
number_bytes_per_row,
compressionsupport,
cuttingsupport,
Expand All @@ -28,7 +25,6 @@
)

from . import (
BrotherQLError,
BrotherQLUnsupportedCmd,
BrotherQLUnknownModel,
BrotherQLRasterError,
Expand Down
1 change: 0 additions & 1 deletion brother_ql/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import struct
import io
import logging
import sys

from PIL import Image
from PIL.ImageOps import colorize
Expand Down

0 comments on commit 740545a

Please sign in to comment.