-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] Source says "Not a typo.", but I'm pretty sure it's a typo #65295
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
I suppose it was meant as # Not a typo. Invert the dictionary twice to get unique values only.
nft_families = {v: k for k, v in _NFTABLES_FAMILIES.items()}
nft_families = {v: k for k, v in nft_families.items()} to filter unique values and then get back some set of corresponding labels. Since each label has an identity mapping, it would make much more sense to just write |
Your suggestion would make sense. However, if the code is supposed to be
the resulting dict depends on the order of the key/values in The current code works, however, the second line has no effect. |
From what I can tell (I'm not the author), the only purpose of the resulting dict's keys would be to be turned back into their values again, so order should not matter, just the uniqueness of values. Lines 451 to 452 in 76e5088
Line 380 in 76e5088
|
@nicholasmhughes any comment on this? this was your code change. |
it's been forever since I messed with this... at first glance, I think it was probably intended to be this ☝️ |
… family values
…alues (cherry picked from commit ab72e70)
…alues (cherry picked from commit ab72e70)
Description
On line 445 in salt/modules/nftables.py we find:
How do these two identical lines make sense?
The text was updated successfully, but these errors were encountered: