Skip to content

Potentially unused functions #2329

Description

@elazarg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions