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

Potentially unused functions #2329

Open
18 tasks
elazarg opened this issue Feb 1, 2023 · 1 comment · May be fixed by #2427
Open
18 tasks

Potentially unused functions #2329

elazarg opened this issue Feb 1, 2023 · 1 comment · May be fixed by #2427
Labels

Comments

@elazarg
Copy link

elazarg commented Feb 1, 2023

Using uncalled I got a list of functions that are apparently unused.
Listed below are those I couldn't convince myself they are actually needed:

  • globalmaptiles.py: LatLonToPixels, PixelsToRaster, ZoomForPixelSize
  • graphqlSchema.py: resolve_accident_markers_hebrew
  • infographics_utils.py: convert_roads_fatal_accidents_to_frontend_view
  • infographics_utils.py: get_widget_factories
  • infographics_utils.py: sum_road_accidents_by_specific_type
  • models.py: get_segment_id
  • pymapcluster.py: get_cluster_size
  • utilities.py: row_to_dict
  • vehicle_type.py: to_type_code
  • vehicle_type.py: get_categories
  • parsers/cbs/executor.py: delete_invalid_entries
  • parsers/infographics_data_cache_updater.py: get_infographics_data_from_cache
  • parsers/infographics_data_cache_updater.py: get_infographics_data_from_cache_by_road_segment
  • parsers/location_extraction.py: reverse_geocode_extract
  • parsers/news_flash_db_adapter.py: recreate_table_for_location_extraction
  • parsers/twitter.py: extract_accident_time
  • widgets/widget.py: get_name, get_rank (look like simple getters, which are unneeded in Python)
  • widgets/widget.py: get_widget_files

Any of those may be actually needed of course. I think it's worth annotating those cases explicitly in the code.

A similar tool, vulture lists many additional functions and variables, though it also has many false positives.

@elazarg elazarg added the bug label Feb 1, 2023
@elazarg
Copy link
Author

elazarg commented Feb 6, 2023

(The label "bug" is not appropriate here but I can't remove it.)

@elazarg elazarg linked a pull request Aug 2, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant