Skip to content

Commit

Permalink
Code linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
nomike committed Sep 18, 2024
1 parent f507427 commit 4907edb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions templatehelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def listchildren(path):
if regex.match('^(?!\\.).*(?<!~)$', f) and not f in ignorelist
]
if os.path.exists(os.path.join(PATHPREFIX, path, '.scmslinks')):
with open(os.path.join(PATHPREFIX, path, '.scmslinks'), 'utf-8') as file:
with open(os.path.join(PATHPREFIX, path, '.scmslinks'), encoding='utf-8') as file:
additional_links = json.load(file)
dirlist.extend(additional_links)
removeitems = []
Expand Down Expand Up @@ -146,7 +146,7 @@ def readfile(path, default=None):
"""
if not os.path.exists(path) and default:
return default
with open(path, 'r') as file:
with open(path, 'rb') as file:
return file.read()

def getfasicon(path):
Expand All @@ -156,8 +156,7 @@ def getfasicon(path):
"""
if os.path.isfile(os.path.join(PATHPREFIX, path) + '.scmsfasicon'):
return readfile(os.path.join(PATHPREFIX, path) + '.scmsfasicon')
else:
return getfastype(path)
return getfastype(path)

def getfastype(path):
"""
Expand Down

0 comments on commit 4907edb

Please sign in to comment.