anyway icon indicating copy to clipboard operation
anyway copied to clipboard

Potentially unused functions

Open elazarg opened this issue 2 years ago • 1 comments

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 avatar Feb 01 '23 23:02 elazarg

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

elazarg avatar Feb 06 '23 23:02 elazarg