Skip to content

Commit

Permalink
Updates formatting for fr strings
Browse files Browse the repository at this point in the history
  • Loading branch information
gnikit committed Jan 31, 2022
1 parent 5d79fa5 commit 29a2a82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fortls/langserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ def get_all_references(self, def_obj, type_mem, file_obj=None):
# Search through all files
def_name = def_obj.name.lower()
def_fqsn = def_obj.FQSN
NAME_REGEX = re.compile(fr"(?:\W|^)({def_name})(?:\W|$)", re.I)
NAME_REGEX = re.compile(rf"(?:\W|^)({def_name})(?:\W|$)", re.I)
if file_obj is None:
file_set = self.workspace.items()
else:
Expand Down
2 changes: 1 addition & 1 deletion fortls/parse_fortran.py
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ def replace_vars(line: str):
for def_tmp, value in defs_tmp.items():
def_regex = def_regexes.get(def_tmp)
if def_regex is None:
def_regex = re.compile(fr"\b{def_tmp}\b")
def_regex = re.compile(rf"\b{def_tmp}\b")
def_regexes[def_tmp] = def_regex
line_new, nsubs = def_regex.subn(value, line)
if nsubs > 0:
Expand Down
2 changes: 1 addition & 1 deletion fortls/regex_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ def src_file_exts(input_exts: list[str] = []) -> Pattern[str]:
FORTRAN_FILE_EXTS.append(e.replace(".", ""))
# Cast into a set to ensure uniqueness of extensions & sort for consistency
# Create a regular expression from this
return re.compile(fr"\.({'|'.join(sorted(set(FORTRAN_FILE_EXTS)))})?$")
return re.compile(rf"\.({'|'.join(sorted(set(FORTRAN_FILE_EXTS)))})?$")

0 comments on commit 29a2a82

Please sign in to comment.