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

FIX: Ignore empty __init__.py. Closes #5 #10

Merged
merged 2 commits into from
Nov 19, 2023
Merged

FIX: Ignore empty __init__.py. Closes #5 #10

merged 2 commits into from
Nov 19, 2023

Conversation

adobki
Copy link
Contributor

@adobki adobki commented Nov 18, 2023

From my commit message:
Skips all checks on empty __init__.py files.

CHANGES
alxcheck/utils/helpers.py:
+ Add is_empty_init_py helper function for skipping all checks on empty __init__.py.

alxcheck/checks/general.py:
* Fix typo: Remove trailing S in function name check_file_ends_with_new_line.

alxcheck/main.py:
+ Print no_ending_new_line error only if new function returns False
* Make Python checks conditional/based on new function's output.

Skips all checks on empty __init__.py files.

CHANGES
alxcheck/utils/helpers.py
+ Add is_empty_init_py function helper function for skipping all checks on empty __init__.py.

alxcheck/checks/general.py:
* Fix typo: Remove trailing S in function name check_file_ends_with_new_line.

alxcheck/main.py
+ Print no_ending_new_line error only if new function returns False
* Make Python checks conditional/based on new check's output.
Skips all checks on empty __init__.py files.

CHANGES
alxcheck/utils/helpers.py
+ Add is_empty_init_py function helper function for skipping all checks on empty __init__.py.

alxcheck/checks/general.py:
* Fix typo: Remove trailing S in function name check_file_ends_with_new_line.

alxcheck/tests/test_general.py:
* Fix typo: Remove trailing S in function name check_file_ends_with_new_line.

alxcheck/main.py
+ Print no_ending_new_line error only if new function returns False
* Make Python checks conditional/based on new check's output.
Copy link
Owner

@Emmo00 Emmo00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool... LGTM
we probably need to have a discussion on whether a __init__.py file should be excutable.

@Emmo00 Emmo00 merged commit aa09c96 into Emmo00:main Nov 19, 2023
4 checks passed
@adobki
Copy link
Contributor Author

adobki commented Nov 19, 2023

we probably need to have a discussion on whether a __init__.py file should be executable.

LOL. No problems. I'd send you a #DM. 😅

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

Successfully merging this pull request may close these issues.

2 participants