Skip to content

Commit

Permalink
api.main: fix pylint error
Browse files Browse the repository at this point in the history
Fix the below pylint error:
```
api/main.py:741:4: W0621: Redefining name 'root' from outer scope (line 112) (redefined-outer-name)
```

Signed-off-by: Jeny Sadadia <[email protected]>
  • Loading branch information
Jeny Sadadia authored and JenySadadia committed Mar 6, 2024
1 parent f3963a6 commit a7ecc22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,8 @@ async def viewer():
"""Serve simple HTML page to view the API /static/viewer.html
Set various no-cache tag we might update it often"""

root = os.path.dirname(os.path.abspath(__file__))
viewer_path = os.path.join(root, 'templates', 'viewer.html')
root_dir = os.path.dirname(os.path.abspath(__file__))
viewer_path = os.path.join(root_dir, 'templates', 'viewer.html')
with open(viewer_path, 'r', encoding='utf-8') as file:
# set header to text/html and no-cache stuff
hdr = {
Expand Down

0 comments on commit a7ecc22

Please sign in to comment.