Skip to content

Commit ed724b0

Browse files
committed
Python linter errors fix
1 parent 2eb90d3 commit ed724b0

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

python_twine/twine/formatters/android.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
"""
44

55
import re
6-
7-
REGEX_CDATA_BRACKET = re.compile(r"<(?!(\/?(\!\[CDATA)))")
8-
REGEX_TAG_BRACKET = re.compile(
9-
r"<(?!(\/?(b|em|i|cite|dfn|big|small|font|tt|s|strike|del|u|super|sub|ul|li|br|div|span|p|a|\!\[CDATA))\b)")
10-
REGEX_RESORCE_IDENTIFIER = re.compile(r"@(?!([a-z\.]+:)?[a-z+]+\/[a-zA-Z_]+)") # @[<package_name>:]<resource_type>/<resource_name>
11-
126
import html
137
from typing import Dict, Optional, TextIO
148
from xml.etree import ElementTree as ET
@@ -22,6 +16,11 @@
2216
number_of_twine_placeholders,
2317
)
2418

19+
REGEX_CDATA_BRACKET = re.compile(r"<(?!(\/?(\!\[CDATA)))")
20+
REGEX_TAG_BRACKET = re.compile(
21+
r"<(?!(\/?(b|em|i|cite|dfn|big|small|font|tt|s|strike|del|u|super|sub|ul|li|br|div|span|p|a|\!\[CDATA))\b)")
22+
REGEX_RESORCE_IDENTIFIER = re.compile(r"@(?!([a-z\.]+:)?[a-z+]+\/[a-zA-Z_]+)") # @[<package_name>:]<resource_type>/<resource_name>
23+
2524

2625
def inner_xml(node:Element) -> str:
2726
# Get inner XML (text + nested elements)

python_twine/twine/twine_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def is_plural(self) -> bool:
159159
"""Check if this definition has plural translations."""
160160
return bool(self.plural_translations)
161161

162-
def copy_lang(self, lang: str) -> TwineDefinition:
162+
def copy_lang(self, lang: str) -> "TwineDefinition":
163163
""" Copy translation for one language into new definition. """
164164
new_def = TwineDefinition(self.key)
165165
new_def._comment = self._comment

0 commit comments

Comments
 (0)