Skip to content

Commit 4efbf79

Browse files
committed
Blackling.
1 parent 76bc73c commit 4efbf79

File tree

13 files changed

+60
-23
lines changed

13 files changed

+60
-23
lines changed

PyFunceble/cli/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,9 @@ def tool(): # pragma: no cover pylint: disable=too-many-branches,too-many-state
741741
)
742742

743743
ci_group.add_argument(
744-
"--travis", action="store_true", help=argparse.SUPPRESS,
744+
"--travis",
745+
action="store_true",
746+
help=argparse.SUPPRESS,
745747
)
746748

747749
ci_group.add_argument(
@@ -860,7 +862,9 @@ def tool(): # pragma: no cover pylint: disable=too-many-branches,too-many-state
860862
)
861863

862864
unique_group.add_argument(
863-
"--iana", action="store_true", help=argparse.SUPPRESS,
865+
"--iana",
866+
action="store_true",
867+
help=argparse.SUPPRESS,
864868
)
865869

866870
unique_group.add_argument(

PyFunceble/cli/production.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ def __init__(self, extern=False):
102102
PyFunceble.VERSION, return_non_digits=True
103103
)
104104

105-
if self._is_version_greater() or not PyFunceble.abstracts.Version.literally_compare(
106-
PyFunceble.VERSION, self.data_version_yaml["current_version"]
105+
if (
106+
self._is_version_greater()
107+
or not PyFunceble.abstracts.Version.literally_compare(
108+
PyFunceble.VERSION, self.data_version_yaml["current_version"]
109+
)
107110
):
108111
# * The local version is greater than the older one.
109112
# or

PyFunceble/config/preset.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,14 @@ def multiprocess_merging_mode(cls):
302302
"""
303303

304304
# pylint: disable=line-too-long
305-
if not PyFunceble.CONFIGURATION.multiprocess_merging_mode or PyFunceble.CONFIGURATION.multiprocess_merging_mode.lower() not in [
306-
"end",
307-
"live",
308-
]:
305+
if (
306+
not PyFunceble.CONFIGURATION.multiprocess_merging_mode
307+
or PyFunceble.CONFIGURATION.multiprocess_merging_mode.lower()
308+
not in [
309+
"end",
310+
"live",
311+
]
312+
):
309313
PyFunceble.CONFIGURATION.multiprocess_merging_mode = "end"
310314

311315
if PyFunceble.CONFIGURATION.db_type in ["mysql", "mariadb"]:

PyFunceble/data/alembic/env.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def run_migrations_online():
9898
configuration["sqlalchemy.url"] = Credential().get_uri()
9999

100100
connectable = engine_from_config(
101-
configuration, prefix="sqlalchemy.", poolclass=pool.NullPool,
101+
configuration,
102+
prefix="sqlalchemy.",
103+
poolclass=pool.NullPool,
102104
)
103105

104106
with connectable.connect() as connection:

PyFunceble/database/whois.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ def __setitem_mysql(cls, index, value):
178178
.one()
179179
)
180180
except NoResultFound:
181-
record = WhoisRecord(subject=index,)
181+
record = WhoisRecord(
182+
subject=index,
183+
)
182184

183185
for db_key, db_value in value.items():
184186
if not PyFunceble.CONFIGURATION.store_whois_record and db_key == "record":

PyFunceble/engine/database/migrations/old2new.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ def does_table_exists(self, table_name):
169169

170170
cursor.execute(
171171
statement,
172-
{"database_name": self.credentials["name"], "table_name": table_name,},
172+
{
173+
"database_name": self.credentials["name"],
174+
"table_name": table_name,
175+
},
173176
)
174177

175178
result = cursor.fetchone()

PyFunceble/engine/mining.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ def __setitem__(self, index, value): # pylint: disable=too-many-branches
181181

182182
if not in_db:
183183
mined = Mined(
184-
subject_id=status.id, mined=value, file_id=status.file_id,
184+
subject_id=status.id,
185+
mined=value,
186+
file_id=status.file_id,
185187
)
186188

187189
with session.Session() as db_session:

PyFunceble/helpers/dict.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,12 @@ def rename_key(self, key_to_rename, strict=True):
205205
return None
206206

207207
def to_json_file(
208-
self, file_path, ensure_ascii=False, indent=4, sort_keys=True, encoding="utf-8",
208+
self,
209+
file_path,
210+
ensure_ascii=False,
211+
indent=4,
212+
sort_keys=True,
213+
encoding="utf-8",
209214
):
210215
"""
211216
Converts the given :code:`dict` to JSON and save the result
@@ -255,7 +260,10 @@ def to_json(self, ensure_ascii=False, indent=4, sort_keys=True):
255260
"""
256261

257262
return dumps(
258-
self.main, ensure_ascii=ensure_ascii, indent=indent, sort_keys=sort_keys,
263+
self.main,
264+
ensure_ascii=ensure_ascii,
265+
indent=indent,
266+
sort_keys=sort_keys,
259267
)
260268

261269
@classmethod

PyFunceble/output/clean.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ def databases_to_delete(cls): # pragma: no cover
194194
# We append the ipv4 reputation file.
195195
result.append(
196196
"{0}{1}".format(
197-
directory, PyFunceble.abstracts.Infrastructure.IPV4_REPUTATION_FILENAME,
197+
directory,
198+
PyFunceble.abstracts.Infrastructure.IPV4_REPUTATION_FILENAME,
198199
)
199200
)
200201

PyFunceble/output/prints.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -719,10 +719,14 @@ def data(self): # pragma: no cover pylint: disable=inconsistent-return-statem
719719
for data in self.header_constructor(to_print, False):
720720
# We loop through the formatted data.
721721

722-
if self.template.lower() in PyFunceble.STATUS.list.generic or self.template in [
723-
"Less",
724-
"Percentage",
725-
]:
722+
if (
723+
self.template.lower() in PyFunceble.STATUS.list.generic
724+
or self.template
725+
in [
726+
"Less",
727+
"Percentage",
728+
]
729+
):
726730
# * The template is in the list of generic status.
727731
# or
728732
# * The template is in a specific list.

0 commit comments

Comments
 (0)