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

dead code reported by vulture #17

Closed
RJ722 opened this issue Jun 12, 2017 · 3 comments
Closed

dead code reported by vulture #17

RJ722 opened this issue Jun 12, 2017 · 3 comments

Comments

@RJ722
Copy link

RJ722 commented Jun 12, 2017

We used vulture (https://github.com/jendrikseipp/vulture) to search
for unused code in your project. You can find the report below. It
would be great if you could give us feedback about which items are
actually used or unused. This would allow us to improve vulture and
ideally it also helps you to remove obsolete code or even find typos
and bugs.

Command:

vulture stephanie-va

Raw Result:

stephanie-va/Stephanie/AudioManager/audio_recognizer.py:12: Unused function 'recognize_from_sphinx'
stephanie-va/Stephanie/local_libs/football_manager.py:117: Unused function 'get_players'
stephanie-va/Stephanie/local_libs/football_manager.py:154: Unused function 'get_team_transfer_talk'
stephanie-va/Stephanie/local_libs/numbers_format.py:284: Unused function 'longestNumber'
stephanie-va/Stephanie/local_libs/pyzomato/core/endpoint_manager.py:14: Unused function 'get_endpoint'
stephanie-va/Stephanie/local_libs/reporter.py:5: Unused class 'Reporter'
stephanie-va/Stephanie/local_libs/search_module.py:5: Unused function 'search_for_competition_by_name'
stephanie-va/Stephanie/local_libs/search_module.py:11: Unused function 'search_for_competition_by_code'
stephanie-va/Stephanie/local_libs/search_module.py:14: Unused function 'search_for_team_by_name'
stephanie-va/Stephanie/local_libs/search_module.py:20: Unused function 'search_for_team_by_code'
stephanie-va/Stephanie/local_libs/search_module.py:23: Unused function 'search_for_player_by_name'
stephanie-va/Stephanie/local_libs/search_module.py:29: Unused function 'search_for_team_from_standing_by_name'
stephanie-va/Stephanie/Modules/alpha_search_module.py:15: Unused function 'do_a_search'
stephanie-va/Stephanie/Modules/evernote_module.py:14: Unused attribute 'user_store'
stephanie-va/Stephanie/Modules/evernote_module.py:19: Unused function 'write_note'
stephanie-va/Stephanie/Modules/evernote_module.py:26: Unused attribute 'content'
stephanie-va/Stephanie/Modules/facebook_module.py:45: Unused function 'get_birthday_reminders'
stephanie-va/Stephanie/Modules/facebook_module.py:87: Unused function 'get_notifications'
stephanie-va/Stephanie/Modules/facebook_module.py:122: Unused function 'status_update'
stephanie-va/Stephanie/Modules/football_module.py:42: Unused function 'get_english_league'
stephanie-va/Stephanie/Modules/football_module.py:45: Unused function 'get_english_second_league'
stephanie-va/Stephanie/Modules/football_module.py:48: Unused function 'get_german_league'
stephanie-va/Stephanie/Modules/football_module.py:51: Unused function 'get_german_second_league'
stephanie-va/Stephanie/Modules/football_module.py:54: Unused function 'get_spanish_league'
stephanie-va/Stephanie/Modules/football_module.py:57: Unused function 'get_spanish_second_league'
stephanie-va/Stephanie/Modules/football_module.py:60: Unused function 'get_french_league'
stephanie-va/Stephanie/Modules/football_module.py:63: Unused function 'get_french_second_league'
stephanie-va/Stephanie/Modules/football_module.py:66: Unused function 'get_netherlands_league'
stephanie-va/Stephanie/Modules/football_module.py:69: Unused function 'get_portuguese_league'
stephanie-va/Stephanie/Modules/football_module.py:72: Unused function 'get_italian_league'
stephanie-va/Stephanie/Modules/football_module.py:75: Unused function 'get_champions_league'
stephanie-va/Stephanie/Modules/football_module.py:95: Unused function 'league_specific_table'
stephanie-va/Stephanie/Modules/football_module.py:106: Unused function 'league_specific_next_fixtures'
stephanie-va/Stephanie/Modules/football_module.py:117: Unused function 'league_specific_previous_fixtures'
stephanie-va/Stephanie/Modules/football_module.py:128: Unused function 'team_handle'
stephanie-va/Stephanie/Modules/football_module.py:147: Unused function 'team_next_fixtures'
stephanie-va/Stephanie/Modules/football_module.py:158: Unused function 'team_previous_fixtures'
stephanie-va/Stephanie/Modules/football_module.py:169: Unused function 'league_specific_news'
stephanie-va/Stephanie/Modules/football_module.py:180: Unused function 'team_specific_news'
stephanie-va/Stephanie/Modules/football_module.py:191: Unused function 'team_news'
stephanie-va/Stephanie/Modules/football_module.py:202: Unused function 'team_injury_news'
stephanie-va/Stephanie/Modules/football_module.py:213: Unused function 'team_transfer_talk'
stephanie-va/Stephanie/Modules/gmail_module.py:22: Unused attribute 'debug'
stephanie-va/Stephanie/Modules/gmail_module.py:86: Unused function 'get_most_recent_date'
stephanie-va/Stephanie/Modules/google_calendar_module.py:86: Unused function 'add_event'
stephanie-va/Stephanie/Modules/google_calendar_module.py:137: Unused function 'get_events_today'
stephanie-va/Stephanie/Modules/google_calendar_module.py:192: Unused function 'get_events_tomorrow'
stephanie-va/Stephanie/Modules/movie_information_module.py:9: Unused function 'give_some_information'
stephanie-va/Stephanie/Modules/system_module.py:11: Unused function 'default'
stephanie-va/Stephanie/Modules/system_module.py:14: Unused function 'meaning_of_life'
stephanie-va/Stephanie/Modules/system_module.py:17: Unused function 'time_right_now'
stephanie-va/Stephanie/Modules/system_module.py:21: Unused function 'date_today'
stephanie-va/Stephanie/Modules/system_module.py:25: Unused function 'wake_up'
stephanie-va/Stephanie/Modules/system_module.py:45: Unused function 'go_to_sleep'
stephanie-va/Stephanie/Modules/system_module.py:53: Unused function 'tell_system_status'
stephanie-va/Stephanie/Modules/twitter_module.py:21: Unused attribute 'myTwitterID'
stephanie-va/Stephanie/Modules/twitter_module.py:33: Unused function 'get_trending'
stephanie-va/Stephanie/Modules/weather_report_module.py:22: Unused function 'weather_report_weekly'
stephanie-va/Stephanie/Modules/weather_report_module.py:31: Unused function 'weather_report_today'
stephanie-va/Stephanie/Modules/weather_report_module.py:40: Unused function 'weather_report_tomorrow'
stephanie-va/Stephanie/Modules/weather_report_module.py:65: Unused variable 'temp_max'
stephanie-va/Stephanie/Modules/weather_report_module.py:66: Unused variable 'temp_min'
stephanie-va/Stephanie/Modules/wikipedia_module.py:11: Unused function 'give_a_summary'

There might be false positives, which can be prevented by adding them to a
whitelist file. You may find more info here

Regards,
vulture team

@SlapBot
Copy link
Owner

SlapBot commented Jun 12, 2017

Hey RJ that's a really nice project you got over there! But actually here's an issue, Stephanie calls all of their methods dynamically by reading from modules.json file! even class is instantiated dynamically, and the names differ from CamelCase to snake_case on converting from modules.json to dynamically instantiate and use the method which is triggered by certain keywords!

You can learn more about it here! https://slapbot.github.io/documentation/resources/algorithm/
Anything which has module appended to it's name, and any resource coming from local_libs directory is instantiated on the fly and used., and as far as recognize_from_sphnix is concerned! It's still in process to be completed!

But still kudos to your project and hopefully it'll be amazing! But maybe Stephanie is not the ideal choice to test it! I will try to contribute to your project as well! Cheers!

@SlapBot SlapBot closed this as completed Jun 12, 2017
@RJ722
Copy link
Author

RJ722 commented Jun 12, 2017

Hey RJ that's a really nice project you got over there! But actually here's an issue, Stephanie calls all of their methods dynamically by reading from modules.json file! even class is instantiated dynamically, and the names differ from CamelCase to snake_case on converting from modules.json to dynamically instantiate and use the method which is triggered by certain keywords!

o O A great deal of work, I will be having a look!

But still kudos to your project and hopefully it'll be amazing! But maybe Stephanie is not the ideal choice to test it!

You can try to extend this functionality to read the dynamically called function through some mapping but this would be hard and error prone I guess, but you are welcome to have a look and work on it anyways! 😄

I will try to contribute to your project as well! Cheers!

Thank You

Credits: @jendrikseipp

@jendrikseipp
Copy link

Thanks, Rahul for testing vulture on Stephanie, but I agree with @SlapBot in that Stephanie's dynamic nature makes it a difficult testbed for vulture. I think it's better to test vulture on "less dynamic" projects.

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