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

localdata/get_local_metadata - never used variable(s) #233

Open
tgrandje opened this issue Jan 20, 2025 · 4 comments
Open

localdata/get_local_metadata - never used variable(s) #233

tgrandje opened this issue Jan 20, 2025 · 4 comments

Comments

@tgrandje
Copy link
Collaborator

This block is flagged by pyflakes and I'm not sure what to make about it:

list_files = os.listdir(insee_folder_local_metadata)
list_files = [f for f in list_files if re.search("^doc_.*csv$", f)]
test_file_available = [f not in list_files for f in all_files]

test_file_available is indeed not used to my knowledge, and list_files seems to be used only to produce that variable (there is a list_files later on, but it's a local variable built from all_files...).

@tgrandje
Copy link
Collaborator Author

The same is true about list_available_file in metadata there:

list_available_file = [not os.path.exists(f) for f in list_expected_files]

(Though list_expected_files is really used later.)

@tgrandje
Copy link
Collaborator Author

Also there for string and list_var_string:

list_var_string = [str(b) for b in [kind, number]]
string = "".join(list_var_string)

@hadrilec
Copy link
Contributor

indeed the above mentioned variables should be removed as unused

@tfardet
Copy link
Collaborator

tfardet commented Feb 5, 2025

@tgrandje can we close 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

3 participants