mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-03-16 22:20:25 +00:00
Readability counts, code must be self-explanatory
This commit is contained in:
parent
d82ca0aed5
commit
a8be4ea814
1 changed files with 5 additions and 4 deletions
9
setup.py
9
setup.py
|
|
@ -9,10 +9,11 @@ from setuptools import setup
|
|||
import analytical as package
|
||||
|
||||
|
||||
def read_file(fname):
|
||||
"""Read content of a file in project folder."""
|
||||
with (Path(__file__).resolve().parent / fname).open() as file:
|
||||
return file.read()
|
||||
def read_file(filename):
|
||||
"""Read a text file and return its contents."""
|
||||
project_home = Path(__file__).parent.resolve()
|
||||
file_path = project_home / filename
|
||||
return file_path.read_text(encoding="utf-8")
|
||||
|
||||
|
||||
setup(
|
||||
|
|
|
|||
Loading…
Reference in a new issue