Skip to content

Commit 7ad3787

Browse files
committed
1. Revereted string formatting.
1 parent 7e51d3e commit 7ad3787

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

pyessv/io_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def read(archive_dir=DIR_ARCHIVE, authority=None, scope=None):
6969
7070
"""
7171
if authority is not None:
72-
return _read_authority(f"{archive_dir}/{authority}", scope)
72+
return _read_authority("{}/{}".format(archive_dir, authority), scope)
7373
else:
7474
return [_read_authority(i) for i in glob.glob('{}/*'.format(archive_dir)) if isdir(i)]
7575

@@ -154,7 +154,7 @@ def _get_path_to_scope_parser_config(s, identifier_type, config_dir):
154154
except OSError:
155155
pass
156156

157-
return join(io_path, f"{identifier_type}.json")
157+
return join(io_path, "{}.json".format(identifier_type))
158158

159159

160160
def _read_authority(dpath, scope_id=None):

pyessv/parsing/identifiers/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def build_identifier(scope, identifier_type, terms, regex_terms={}):
2626
or let the pyessv client to deal with it
2727
"""
2828

29-
assert identifier_type in IDENTIFIER_TYPE_SET, f"Unsupported parser type: {identifier_type}"
29+
assert identifier_type in IDENTIFIER_TYPE_SET, "Unsupported parser type: {}".format(identifier_type)
3030

3131
# Set parsing configuration.
3232
cfg = get_config(scope, identifier_type)

pyessv/parsing/identifiers/config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __repr__(self):
4141
"""Instance representation.
4242
4343
"""
44-
return f"parser-spec|const::{self.value}::{self.is_required}"
44+
return "parser-spec|const::{}::{}".format(self.value, self.is_required)
4545

4646

4747
class CollectionParsingSpecification(ParsingSpecification):
@@ -62,7 +62,7 @@ def __repr__(self):
6262
"""Instance representation.
6363
6464
"""
65-
return f"parser-spec|collection::{self.namespace}::{self.is_required}"
65+
return "parser-spec|collection::{}::{}".format(self.namespace, self.is_required)
6666

6767

6868
class RegExParsingSpecification(ParsingSpecification):
@@ -83,7 +83,7 @@ def __repr__(self):
8383
"""Instance representation.
8484
8585
"""
86-
return f"parser-spec|regex::{self.expression}::{self.is_required}"
86+
return "parser-spec|regex::{}::{}".format(self.expression, self.is_required)
8787

8888

8989
class ParsingConfiguration():
@@ -120,7 +120,7 @@ def __repr__(self):
120120
"""Instance representation.
121121
122122
"""
123-
return f"parser-config|{self.scope_namespace}::{self.identifier_type}::{len(self.specs)}"
123+
return "parser-config|{}::{}::{}".format(self.scope_namespace, self.identifier_type, len(self.specs))
124124

125125

126126
def get_config(scope, identifier_type):
@@ -133,7 +133,7 @@ def get_config(scope, identifier_type):
133133
"""
134134
if isinstance(scope, compat.basestring):
135135
scope = loader.load(scope)
136-
cache_key = f"{scope} :: {identifier_type}"
136+
cache_key = "{scope} :: {identifier_type}".format(scope, identifier_type)
137137
if cache_key not in _CACHE:
138138
_CACHE[cache_key] = _get_config(scope, identifier_type)
139139

pyessv/parsing/identifiers/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def parse_identifer(scope, identifier_type, identifier, strictness=PARSING_STRIC
2222
:param strictness: Strictness level to apply when applying name matching rules.
2323
2424
"""
25-
assert identifier_type in IDENTIFIER_TYPE_SET, f"Unsupported parser type: {identifier_type}"
25+
assert identifier_type in IDENTIFIER_TYPE_SET, "Unsupported parser type: {}".format(identifier_type)
2626

2727
# Set parsing configuration.
2828
cfg = get_config(scope, identifier_type)

0 commit comments

Comments
 (0)