Skip to content

Commit

Permalink
Add type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Dec 16, 2023
1 parent 9ebe5e1 commit a0cddd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fontra/backends/filenames.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
assert len(set(base32chars)) == 32


def stringToFileName(string):
def stringToFileName(string: str) -> str:
codeDigits = []
for i in range(0, len(string), 5):
digit = 0
Expand All @@ -64,6 +64,6 @@ def stringToFileName(string):
return fileName + disambiguationCode


def fileNameToString(fileName):
def fileNameToString(fileName: str) -> str:
string = fileName.split(separatorChar, 1)[0]
return unquote(string, encoding="ascii", errors="strict")

0 comments on commit a0cddd7

Please sign in to comment.