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

Ignore "ambiguous variable name" warning for EasyConfig style check #4644

Closed
wants to merge 1 commit into from

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Sep 17, 2024

'l' is considered an ambiguous name, but we use it often for 'lib'

Required for easybuilders/easybuild-easyconfigs#21405

@boegel
Copy link
Member

boegel commented Sep 23, 2024

@Flamefire I actually think it would be better if we stopped using l as single-letter variable in easyconfig, so rather than ignoring it, we should fix it?

@boegel boegel added this to the 4.x milestone Sep 23, 2024
@Flamefire
Copy link
Contributor Author

Flamefire commented Sep 24, 2024

I wouldn't mind. It should be a "quick" search and replace. I see at least 104 affected easyconfigs. Additionally what should l for l in (lib, lib64) become? We'd need to use local_lib which is a bit verbose. Or i

@boegel
Copy link
Member

boegel commented Sep 25, 2024

I wouldn't mind. It should be a "quick" search and replace. I see at least 104 affected easyconfigs. Additionally what should l for l in (lib, lib64) become? We'd need to use local_lib which is a bit verbose. Or i

I'd prefer no single letter variables at all actually...

@Flamefire
Copy link
Contributor Author

I'd prefer no single letter variables at all actually...

In list comprehensions like ['%s/libfoo.so' % i for i in (lib, lib64)] or ['lib/' + f for f in local_files] I don't see how longer names would increase the readability especially when they become much longer: ['%s/libfoo.so' % local_dir for local_dir in (lib, lib64)] or ['lib/' + local_file for local_file in local_files] where I find the prefix a bit confusing.
And if we do change it I guess we'd need to fix a lot of ECs. Not sure if that naming check is only run for new/changed ECs but I fear it would require some unrelated changes for otherwise small fixes to existing ECs.

@boegel
Copy link
Member

boegel commented Sep 30, 2024

Let's then just use x instead of l (in #21405), which is non-ambiguous

@boegel
Copy link
Member

boegel commented Sep 30, 2024

No need for this with the changes in easybuilders/easybuild-easyconfigs#21502, so closing this...

@boegel boegel closed this Sep 30, 2024
@Flamefire Flamefire deleted the pep8-dev branch October 1, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants