Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce number of blank lines #35

Closed
afuetterer opened this issue Aug 23, 2019 · 4 comments
Closed

Reduce number of blank lines #35

afuetterer opened this issue Aug 23, 2019 · 4 comments
Assignees

Comments

@afuetterer
Copy link
Contributor

See https://www.python.org/dev/peps/pep-0008/#blank-lines for reference.

There are a lot of blank lines in the code, that make the modules longer than necessary. For example these blank lines

def uni(elem, file_csv):
"""Call function to generate frequencies depending on the variable type
Input:
elem: dict
file_csv: pandas DataFrame
Output:
statistics: OrderedDict
"""
statistics = OrderedDict()
if elem["type"] == "cat":
cat_dict = uni_cat(elem, file_csv)
statistics.update(cat_dict)
elif elem["type"] == "string":
string_dict = uni_string()
statistics.update(string_dict)
elif elem["type"] == "number":
number_dict = uni_number()
statistics.update(number_dict)
return statistics

are not really needed to understand the function. It's an if statement.

@mpahl
Copy link
Contributor

mpahl commented Sep 3, 2019

Done by @hansendx

@afuetterer
Copy link
Contributor Author

This was only an example. There are still plenty of blank lines in the code base.

mpahl added a commit that referenced this issue Sep 12, 2019
@mpahl
Copy link
Contributor

mpahl commented Sep 12, 2019

Close issue?

@afuetterer
Copy link
Contributor Author

closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants