python-blogs
python-blogs copied to clipboard
code cleanup
prospector found a good amount of code cleanup to do
[root@blogs python-blogs]# prospector
Messages
========
blogs_list/feeds.py
Line: 11
pylint: unused-import / Unused cache imported from django.core.cache
Line: 13
pylint: unused-import / Unused HttpResponseNotFound imported from django.http
Line: 15
pylint: unused-import / Unused UserProfile imported from gsoc.models
Line: 106
pylint: arguments-differ / Parameters differ from overridden 'get_object' method (col 4)
Line: 113
pylint: no-else-raise / Unnecessary "else" after "raise" (col 8)
Line: 141
pylint: chained-comparison / Simplify chained comparison between the operands (col 25)
Line: 145
pylint: no-else-return / Unnecessary "else" after "return" (col 8)
Line: 159
pylint: unused-argument / Unused argument 'obj' (col 23)
Line: 186
pylint: unused-variable / Unused variable 'site' (col 8)
Line: 189
pylint: unused-argument / Unused argument 'item' (col 37)
Line: 193
pylint: unused-variable / Unused variable 'site' (col 8)
Line: 198
pylint: too-many-format-args / Too many arguments for format string (col 14)
Line: 214
pylint: unused-argument / Unused argument 'obj' (col 23)
Line: 217
pylint: arguments-differ / Parameters differ from overridden 'get_object' method (col 4)
Line: 249
pylint: unused-variable / Unused variable 'site' (col 8)
Line: 252
pylint: unused-argument / Unused argument 'item' (col 37)
Line: 256
pylint: unused-variable / Unused variable 'site' (col 8)
Line: 261
pylint: too-many-format-args / Too many arguments for format string (col 14)
blogs_list/urls.py
Line: 6
pylint: unused-import / Unused import aldryn_newsblog.urls
gsoc/admin.py
Line: 253
pylint: unused-argument / Unused argument 'self' (col 25)
Line: 269
pylint: no-else-return / Unnecessary "else" after "return" (col 4)
Line: 287
pylint: unused-argument / Unused argument 'self' (col 18)
Line: 344
pylint: unused-argument / Unused argument 'self' (col 20)
Line: 464
pylint: signature-differs / Signature differs from overridden 'changeform_view' method (col 4)
Line: 487
pylint: unused-argument / Unused argument 'self' (col 18)
Line: 564
pylint: arguments-differ / Parameters differ from overridden 'has_add_permission' method (col 4)
pylint: unused-argument / Unused argument 'obj' (col 42)
Line: 578
pylint: arguments-differ / Parameters differ from overridden 'has_add_permission' method (col 4)
pylint: unused-argument / Unused argument 'obj' (col 42)
Line: 667
pylint: arguments-differ / Parameters differ from overridden 'has_add_permission' method (col 4)
pylint: unused-argument / Unused argument 'obj' (col 42)
Line: 677
pylint: arguments-differ / Parameters differ from overridden 'has_add_permission' method (col 4)
pylint: unused-argument / Unused argument 'obj' (col 42)
gsoc/cms_toolbars.py
Line: 29
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 11)
Line: 30
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 8)
Line: 34
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 30)
Line: 40
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 25)
Line: 44
pylint: undefined-variable / Undefined variable 'ADMIN_SITES_BREAK' (col 33)
Line: 55
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 8)
Line: 61
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 64
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 67
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 70
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 73
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 76
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 80
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 87
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 90
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 94
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 8)
Line: 97
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 8)
Line: 100
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 8)
Line: 106
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 112
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 118
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 12)
Line: 121
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 8)
Line: 125
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 8)
Line: 126
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 8)
Line: 129
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 8)
Line: 132
pylint: protected-access / Access to a protected member _admin_menu of a client class (col 31)
Line: 159
pylint: too-many-locals / Too many local variables (23/15)
pylint: too-many-statements / Too many statements (76/60)
pylint: function-redefined / function already defined line 145
mccabe: MC0001 / populate is too complex (26)
Line: 160
pylint: protected-access / Access to a protected member _NewsBlogToolbar__get_newsblog_config of a client class (col 13)
Line: 275
pylint: unused-variable / Unused variable 'e' (col 8)
gsoc/cms_wizards.py
Line: 7
pylint: unused-import / Unused add_plugin imported from cms.api
Line: 8
pylint: unused-import / Unused permissions imported from cms.utils
Line: 12
pylint: unused-import / Unused clean_html imported from djangocms_text_ckeditor.html
Line: 26
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'self' (col 28)
gsoc/common/utils/build_tasks.py
Line: 3
pylint: unused-import / Unused import urllib.parse
Line: 21
pylint: literal-comparison / Comparison to literal (col 15)
pylint: literal-comparison / Comparison to literal (col 15)
pyflakes: F999 / use ==/!= to compare str, bytes, and int literals (col 16)
Line: 37
pylint: unused-variable / Unused variable 's' (col 16)
Line: 43
pylint: too-many-locals / Too many local variables (21/15)
pylint: too-many-locals / Too many local variables (21/15)
Line: 119
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: unused-argument / Unused argument 'builder' (col 31)
pylint: unused-argument / Unused argument 'builder' (col 31)
Line: 131
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: unused-argument / Unused argument 'builder' (col 30)
pylint: unused-argument / Unused argument 'builder' (col 30)
gsoc/common/utils/commands.py
Line: 6
pylint: unused-import / Unused timezone imported from django.utils
Line: 98
pylint: no-else-return / Unnecessary "else" after "return" (col 8)
pylint: no-else-return / Unnecessary "else" after "return" (col 8)
Line: 106
pylint: unused-argument / Unused argument 'scheduler' (col 21)
pylint: unused-argument / Unused argument 'scheduler' (col 21)
Line: 128
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: too-many-locals / Too many local variables (16/15)
pylint: too-many-locals / Too many local variables (16/15)
Line: 176
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: unused-argument / Unused argument 'scheduler' (col 23)
pylint: unused-argument / Unused argument 'scheduler' (col 23)
gsoc/common/utils/memcached_stats.py
Line: 3
pylint: unused-import / Unused import sys
Line: 37
pylint: no-else-return / Unnecessary "else" after "return" (col 8)
pylint: no-else-return / Unnecessary "else" after "return" (col 8)
gsoc/common/utils/tools.py
Line: 10
pylint: import-error / Unable to import 'github'
pylint: import-error / Unable to import 'github'
Line: 14
pylint: unused-argument / Unused argument 'template' (col 13)
pylint: unused-argument / Unused argument 'template' (col 13)
pylint: unused-argument / Unused argument 'subject' (col 28)
pylint: unused-argument / Unused argument 'subject' (col 28)
pylint: unused-argument / Unused argument 'template_data' (col 42)
pylint: unused-argument / Unused argument 'template_data' (col 42)
Line: 25
pylint: unused-argument / Unused argument 'object_pk' (col 13)
pylint: unused-argument / Unused argument 'object_pk' (col 13)
pylint: unused-argument / Unused argument 'template' (col 24)
pylint: unused-argument / Unused argument 'template' (col 24)
pylint: unused-argument / Unused argument 'subject' (col 39)
pylint: unused-argument / Unused argument 'subject' (col 39)
pylint: unused-argument / Unused argument 'template_data' (col 53)
pylint: unused-argument / Unused argument 'template_data' (col 53)
Line: 35
pylint: dangerous-default-value / Dangerous default value {} as argument
pylint: dangerous-default-value / Dangerous default value {} as argument
Line: 86
pylint: chained-comparison / Simplify chained comparison between the operands (col 11)
pylint: chained-comparison / Simplify chained comparison between the operands (col 11)
Line: 89
pylint: unused-variable / Unused variable 'e' (col 4)
Line: 93
pylint: dangerous-default-value / Dangerous default value [] as argument
pylint: dangerous-default-value / Dangerous default value [] as argument
Line: 210
pylint: unused-variable / Unused variable 'e' (col 8)
gsoc/context_processors.py
Line: 1
pylint: unused-import / Unused NewsBlogConfig imported from aldryn_newsblog.cms_appconfig
Line: 24
pylint: unused-variable / Unused variable 'e' (col 8)
gsoc/forms.py
Line: 71
pylint: modelform-uses-exclude / Use explicit fields instead of exclude in ModelForm (col 8)
Line: 136
pylint: no-else-raise / Unnecessary "elif" after "raise" (col 8)
gsoc/management/commands/googleapiauth.py
Line: 4
pylint: import-error / Unable to import 'google_auth_oauthlib.flow'
gsoc/management/commands/runcron.py
Line: 1
pylint: redefined-builtin / Redefining built-in 'TimeoutError'
Line: 7
pylint: unused-import / Unused GsocYear imported from gsoc.models
Line: 45
pylint: unused-argument / Unused argument 'options' (col 26)
Line: 52
pylint: literal-comparison / Comparison to literal (col 11)
pyflakes: F999 / use ==/!= to compare str, bytes, and int literals (col 12)
Line: 127
pylint: too-many-locals / Too many local variables (16/15) (col 4)
Line: 138
pylint: literal-comparison / Comparison to literal (col 11)
pyflakes: F999 / use ==/!= to compare str, bytes, and int literals (col 12)
Line: 164
pylint: literal-comparison / Comparison to literal (col 11)
pyflakes: F999 / use ==/!= to compare str, bytes, and int literals (col 12)
Line: 178
pylint: unused-variable / Unused variable 'threads' (col 8)
Line: 179
pylint: literal-comparison / Comparison to literal (col 11)
pyflakes: F999 / use ==/!= to compare str, bytes, and int literals (col 12)
Line: 185
pylint: unused-variable / Unused variable 'e' (col 12)
gsoc/models.py
Line: 7
pylint: import-error / Unable to import 'bleach'
Line: 10
pylint: import-error / Unable to import 'bs4'
Line: 12
pylint: import-error / Unable to import 'googleapiclient.discovery'
Line: 15
pylint: unused-import / Unused messages imported from django.contrib
Line: 480
pylint: arguments-differ / Parameters differ from overridden 'save' method (col 4)
Line: 607
pylint: arguments-differ / Parameters differ from overridden 'save' method (col 4)
Line: 726
pylint: arguments-differ / Parameters differ from overridden 'save' method (col 4)
Line: 756
pep8: W605 / invalid escape sequence '\.' (col -146)
pep8: W605 / invalid escape sequence '\.' (col -70)
Line: 789
pylint: unused-argument / Unused argument 'text' (col 33)
Line: 892
pylint: too-many-locals / Too many local variables (19/15) (col 4)
Line: 906
pylint: unused-variable / Unused variable 'profiles' (col 12)
Line: 1083
pylint: arguments-differ / Parameters differ from overridden 'save' method (col 4)
Line: 1112
pylint: arguments-differ / Parameters differ from overridden 'save' method (col 4)
Line: 1155
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 24)
Line: 1165
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 16)
Line: 1175
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 35)
Line: 1190
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 35)
Line: 1211
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 17)
Line: 1217
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 26)
Line: 1223
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 34)
pylint: unused-argument / Unused argument 'instance' (col 42)
Line: 1240
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 31)
Line: 1250
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 31)
Line: 1258
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 29)
Line: 1264
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 29)
Line: 1271
pyflakes: F811 / redefinition of unused 'add_revoke_perms_builder' from line 1263 (col 1)
Line: 1272
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 29)
pylint: function-redefined / function already defined line 1264
Line: 1280
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 36)
pylint: unused-argument / Unused argument 'instance' (col 44)
Line: 1295
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 34)
Line: 1304
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 35)
Line: 1311
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 40)
Line: 1318
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 30)
Line: 1324
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 26)
Line: 1336
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 15)
Line: 1349
pylint: unused-argument / Unused argument 'kwargs'
pylint: unused-argument / Unused argument 'sender' (col 16)
gsoc/settings.py
Line: 17
pylint: unused-wildcard-import / Unused imports from wildcard import: TEMPLATE_DEBUG, SECRET_KEY, ADMIN_EMAIL, ADMINS, DATABASES, EMAIL_BACKEND, EMAIL_SUBJECT_PREFIX, DEFAULT_FROM_EMAIL, SERVER_EMAIL, EMAIL_HOST, EMAIL_PORT, REPLY_EMAIL, RECAPTCHA_PRIVATE_KEY, RECAPTCHA_PUBLIC_KEY, RECAPTCHA_THRESHOLD, GOOGLE_API_SCOPES, GOOGLE_API_CLIENT_CONFIG, STATIC_SITE_REPO, GITHUB_ACCESS_TOKEN, GITHUB_FILE_PATH, DEBUG_TOOLBAR_CONFIG, INTERNAL_IPS, DEBUG_TOOLBAR_PANELS (col 4)
Line: 226
pyflakes: F999 / 'DEBUG' may be undefined, or defined from star imports: settings_local (col 4)
gsoc/sitemaps.py
Line: 1
pylint: unused-import / Unused import urllib.parse
Line: 4
pylint: unused-import / Unused settings imported from django.conf
Line: 30
pylint: unused-variable / Unused variable 'e' (col 12)
gsoc/templatetags/app_tag.py
Line: 26
pyflakes: F841 / local variable 'utcTime' is assigned to but never used (col 5)
gsoc/urls.py
Line: 4
pylint: unused-import / Unused CMSSitemap imported from cms.sitemaps
Line: 13
pylint: reimported / Reimport 'path' (imported line 6)
pyflakes: F811 / redefinition of unused 'path' from line 6 (col 1)
gsoc/views.py
Line: 3
pylint: unused-import / Unused MemcachedStats imported from common.utils.memcached_stats
Line: 30
pylint: reimported / Reimport 'settings' (imported line 1)
pyflakes: F811 / redefinition of unused 'settings' from line 1 (col 1)
Line: 41
pylint: import-error / Unable to import 'profanityfilter'
Line: 85
pylint: unused-variable / Unused variable 'laparams' (col 4)
Line: 126
pylint: unused-variable / Unused variable 'user' (col 4)
Line: 189
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: too-many-statements / Too many statements (65/60)
mccabe: MC0001 / register_view is too complex (18)
Line: 233
pylint: simplifiable-if-expression / The if expression can be replaced with 'not test' (col 28)
Line: 286
pylint: no-else-return / Unnecessary "else" after "return" (col 8)
Line: 288
pylint: undefined-variable / Undefined variable 'update_session_auth_hash' (col 12)
Line: 302
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
pylint: too-many-locals / Too many local variables (21/15)
Line: 377
pylint: no-else-return / Unnecessary "else" after "return" (col 8)
Line: 384
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
Line: 393
pylint: no-else-return / Unnecessary "else" after "return" (col 8)
Line: 459
pylint: no-value-for-parameter / No value for argument 'message' in function call (col 16)
Line: 461
pylint: no-value-for-parameter / No value for argument 'message' in function call (col 12)
Line: 466
pylint: wrong-import-position / Import "from django.http import HttpResponse" should be placed at the top of the module
settings_local.py
Line: 8
dodgy: secret / Possible hardcoded secret key
Line: 98
pylint: trailing-newlines / Trailing newlines
suborg/admin.py
Line: 1
pylint: unused-import / Unused admin imported from django.contrib
suborg/models.py
Line: 1
pylint: unused-import / Unused models imported from django.db
suborg/views.py
Line: 4
pylint: unused-import / Unused User imported from django.contrib.auth.models
Line: 87
pylint: inconsistent-return-statements / Either all return statements in a function should return an expression, or none of them should.
Line: 136
pylint: unexpected-keyword-arg / Unexpected keyword argument 'queryset' in constructor call (col 14)
Check Information
=================
Started: 2020-05-27 15:51:04.736621
Finished: 2020-05-27 15:52:44.343582
Time Taken: 99.61 seconds
Formatter: grouped
Profiles: default, no_doc_warnings, no_test_warnings, strictness_medium, strictness_high, strictness_veryhigh, no_member_warnings
Strictness: None
Libraries Used: django
Tools Run: dodgy, mccabe, pep8, profile-validator, pyflakes, pylint
Messages Found: 238
Hey @botanicvelious, I can clean up this code.
hello! I can clean up this code easily as I am the GSOC contributors.
feel free to go for it, if you have any questions please hit me up on irc
@botanicvelious
Has this issue been solved ? Kindly let me know . As u have added enhancement label to it , this means it has been solved most probably But the original files are not showing these changes. Just want to confirm it as I am a beginner in open source
Closing in preparation for archiving this repo.