Skip to content

Commit 71f042f

Browse files
committed
🚨 Silence some linters
1 parent 3059727 commit 71f042f

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

.bandit.yml

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ tests:
8383

8484
# (optional) list skipped test IDs here, eg '[B101, B406]':
8585
skips:
86+
- B404
87+
- B603
88+
- B607
8689
- B608
8790

8891
### (optional) plugin settings - some test plugins require configuration data

mysql_to_sqlite3/click_utils.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def parser_process(value, state):
4040
# call the actual process
4141
self._previous_parser_process(value, state)
4242

43-
retval = super(OptionEatAll, self).add_to_parser(parser, ctx)
43+
retval = super(OptionEatAll, self).add_to_parser( # pylint: disable=E1111
44+
parser, ctx
45+
)
4446
for name in self.opts:
4547
# pylint: disable=W0212
4648
our_parser = parser._long_opt.get(name) or parser._short_opt.get(name)

mysql_to_sqlite3/debug_info.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ def _implementation():
3838
implementation_version = platform.python_version()
3939
elif implementation == "PyPy":
4040
implementation_version = "%s.%s.%s" % (
41-
sys.pypy_version_info.major,
42-
sys.pypy_version_info.minor,
43-
sys.pypy_version_info.micro,
41+
sys.pypy_version_info.major, # noqa: ignore=E1101 pylint: disable=E1101
42+
sys.pypy_version_info.minor, # noqa: ignore=E1101 pylint: disable=E1101
43+
sys.pypy_version_info.micro, # noqa: ignore=E1101 pylint: disable=E1101
4444
)
45-
if sys.pypy_version_info.releaselevel != "final":
46-
implementation_version = "".join(
47-
[implementation_version, sys.pypy_version_info.releaselevel]
48-
)
45+
rel = (
46+
sys.pypy_version_info.releaselevel # noqa: ignore=E1101 pylint: disable=E1101
47+
)
48+
if rel != "final":
49+
implementation_version = "".join([implementation_version, rel])
4950
elif implementation == "Jython":
5051
implementation_version = platform.python_version() # Complete Guess
5152
elif implementation == "IronPython":

mysql_to_sqlite3/transporter.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ def _column_type_length(cls, column_type):
149149
def _translate_type_from_mysql_to_sqlite(
150150
cls, column_type # pylint: disable=C0330
151151
): # pylint: disable=R0911
152-
"""Handle MySQL 8"""
152+
"""Handle MySQL 8."""
153153
try:
154154
column_type = column_type.decode()
155155
except (UnicodeDecodeError, AttributeError):
156156
pass
157157

158-
"""This could be optimized even further, however is seems adequate."""
158+
# This could be optimized even further, however is seems adequate.
159159
match = cls._valid_column_type(column_type)
160160
if not match:
161161
raise ValueError("Invalid column_type!")
@@ -272,7 +272,6 @@ def _build_create_table_sql(self, table_name):
272272
c.UPDATE_RULE,
273273
c.DELETE_RULE
274274
""".format(
275-
# MySQL 8.0.19 still works with "LEFT JOIN" everything above requires "JOIN"
276275
JOIN="JOIN"
277276
if (server_version[0] == 8 and server_version[2] > 19)
278277
else "LEFT JOIN"

tox.ini

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ deps =
8080
simplejson
8181
tqdm
8282
packaging
83-
disable = C0411
83+
disable =
84+
C0411
85+
E1101
8486
commands = pylint mysql_to_sqlite3
8587

8688
[testenv:bandit]

0 commit comments

Comments
 (0)