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

mkinit removes __ignore__ under certain circumstances #45

Open
alessio-locatelli opened this issue May 17, 2024 · 0 comments
Open

mkinit removes __ignore__ under certain circumstances #45

alessio-locatelli opened this issue May 17, 2024 · 0 comments

Comments

@alessio-locatelli
Copy link

alessio-locatelli commented May 17, 2024

Describe the bug

Depending on the __ignore__ variable position it can be kept or removed.

To Reproduce

🟢 No problems (__ignore__ variable survives in the file):

# Some text here.
__ignore__ = ["spam", "eggs"]
__protected__ = ["foobar",]
# Some text here.

__ignore__ = ["spam", "eggs"]
__protected__ = ["foobar",]
# Some text here.

__ignore__ = ["spam", "eggs"]

__protected__ = ["foobar",]
__ignore__ = ["spam", "eggs"]
__private__ = []
# Some text.

__ignore__ = ["spam", "eggs"]
# Some text.

🔴 __ignore__ is removed by mistake:

# Some text here.
__protected__ = ["foobar",]
__ignore__ = ["spam", "eggs"]
# Some text here.
__protected__ = ["foobar",]
__ignore__ = ["spam", "eggs"]
# Some text here.
__ignore__ = ["spam", "eggs"]
__ignore__ = ["spam", "eggs"]
__protected__ = []
__ignore__ = ["spam", "eggs"]

Expected behavior

Always keep __ignore__ when it is around the top of the file.

@alessio-locatelli alessio-locatelli changed the title mkinit removes __ignore__ by mistake under certain circumstances mkinit removes __ignore__ under certain circumstances May 17, 2024
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

1 participant