Skip to content

Commit

Permalink
chore(#1): clean for pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Apr 17, 2024
1 parent a1c0d12 commit 81b5376
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@
"""
setup.py
"""
from setuptools import setup, find_packages
import os
from setuptools import setup, find_packages

def version():
"""
Fetch version from version.txt.
:return: version
"""
version_file = 'version.txt'
if os.path.exists(version_file):
with open(version_file, 'r', encoding='utf-8') as f:
return f.read().strip()
with open(version_file, 'r', encoding='utf-8') as file:
return file.read().strip()
else:
return '0.0.0'

Expand Down

0 comments on commit 81b5376

Please sign in to comment.