Skip to content

Commit 4d9f631

Browse files
committed
update formatting with new black version
1 parent eca3e38 commit 4d9f631

File tree

7 files changed

+29
-24
lines changed

7 files changed

+29
-24
lines changed

cc_legal_tools/settings/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Django settings for cc_legal_tools project.
33
"""
4+
45
# Standard library
56
import copy
67
import mimetypes

i18n/transifex.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Interface with Transifex
33
"""
4+
45
# Standard library
56
import difflib
67
import logging

legal_tools/bs_utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Little utility methods for use with BeautifulSoup4
33
"""
4+
45
# Standard library
56
from itertools import takewhile
67

legal_tools/git_utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ def setup_to_call_git():
3737
if "GIT_SSH" not in env:
3838
env["GIT_SSH"] = os.path.join(settings.PROJECT_ROOT, "ssh_wrapper.sh")
3939
if "TRANSLATION_REPOSITORY_DEPLOY_KEY" not in env:
40-
env[
41-
"TRANSLATION_REPOSITORY_DEPLOY_KEY"
42-
] = settings.TRANSLATION_REPOSITORY_DEPLOY_KEY
40+
env["TRANSLATION_REPOSITORY_DEPLOY_KEY"] = (
41+
settings.TRANSLATION_REPOSITORY_DEPLOY_KEY
42+
)
4343
if "PROJECT_ROOT" not in env:
4444
env["PROJECT_ROOT"] = settings.PROJECT_ROOT
4545

legal_tools/management/commands/load_html_files.py

+17-15
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,11 @@ def write_temp_po_files(
410410
pofile.append(
411411
POEntry(
412412
msgid=clean_string(english[index]),
413-
msgstr=clean_string(disclaimers_text[index])
414-
if language_code != "en"
415-
else "",
413+
msgstr=(
414+
clean_string(disclaimers_text[index])
415+
if language_code != "en"
416+
else ""
417+
),
416418
)
417419
)
418420
# noqa: E501
@@ -797,21 +799,21 @@ def insert_after(after_this, what_to_insert):
797799

798800
# s2a2: Exceptions and Limitations.
799801
nt = name_and_text(soup.find(id="s2a2"))
800-
messages[
801-
"s2a2_license_grant_exceptions"
802-
] = f"<strong>{nt['name']}</strong>{nt['text']}"
802+
messages["s2a2_license_grant_exceptions"] = (
803+
f"<strong>{nt['name']}</strong>{nt['text']}"
804+
)
803805

804806
# s2a3: Term.
805807
nt = name_and_text(soup.find(id="s2a3"))
806-
messages[
807-
"s2a3_license_grant_term"
808-
] = f"<strong>{nt['name']}</strong>{nt['text']}"
808+
messages["s2a3_license_grant_term"] = (
809+
f"<strong>{nt['name']}</strong>{nt['text']}"
810+
)
809811

810812
# s2a4: Media and formats; technical modifications allowed.
811813
nt = name_and_text(soup.find(id="s2a4"))
812-
messages[
813-
"s2a4_license_grant_media"
814-
] = f"<strong>{nt['name']}</strong>{nt['text']}"
814+
messages["s2a4_license_grant_media"] = (
815+
f"<strong>{nt['name']}</strong>{nt['text']}"
816+
)
815817

816818
# s2a5: scope/grant/downstream
817819
# The title is just the prefix to the list of items, which are in their
@@ -970,9 +972,9 @@ def insert_after(after_this, what_to_insert):
970972

971973
s4b = nested_text(soup.find(id="s4b"))
972974
if unit.endswith("-sa"):
973-
messages[
974-
"s4_sui_generics_database_rights_adapted_material_sa"
975-
] = s4b
975+
messages["s4_sui_generics_database_rights_adapted_material_sa"] = (
976+
s4b
977+
)
976978
else:
977979
messages["s4_sui_generics_database_rights_adapted_material"] = s4b
978980
messages["s4_sui_generics_database_rights_comply_s3a"] = nested_text(

legal_tools/models.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,9 @@ def get_metadata(self):
580580
data["permits_reproduction"] = self.permits_reproduction
581581
data["permits_sharing"] = self.permits_sharing
582582
data["prohibits_commercial_use"] = self.prohibits_commercial_use
583-
data[
584-
"prohibits_high_income_nation_use"
585-
] = self.prohibits_high_income_nation_use
583+
data["prohibits_high_income_nation_use"] = (
584+
self.prohibits_high_income_nation_use
585+
)
586586
data["requires_attribution"] = self.requires_attribution
587587
data["requires_notice"] = self.requires_notice
588588
data["requires_share_alike"] = self.requires_share_alike

legal_tools/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -752,9 +752,9 @@ def branch_status_helper(repo, translation_branch):
752752
"official_git_branch": settings.OFFICIAL_GIT_BRANCH,
753753
"branch": translation_branch,
754754
"commits": commits_for_template[:NUM_COMMITS],
755-
"last_commit": commits_for_template[0]
756-
if commits_for_template
757-
else None,
755+
"last_commit": (
756+
commits_for_template[0] if commits_for_template else None
757+
),
758758
}
759759

760760

0 commit comments

Comments
 (0)