Project

General

Profile

Segnalazione #58

Fix per PEP8

Added by Christopher R. Gabriel over 6 years ago. Updated over 6 years ago.

Status:
Chiuso
Priority:
Bassa
Assignee:
-
Target version:
Start date:
06/28/2016
Due date:
% Done:

0%

Resolution:
fixed

Description

Ho visto cose tipo

-BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+BASE_DIR = os.path.dirname( os.path.dirname( os.path.abspath( __file__ ) ) )

in commit a5c26366ead8a3c409af75973896569a416e70b3

Tutti il codice deve passare senza errori i controlli di pep8.

Associated revisions

Revision d549ed56 (diff)
Added by Marco Marinello over 6 years ago

Correzioni vecchio codice (PEP-8)
refs #58

Revision fe764da6 (diff)
Added by Christopher R. Gabriel over 6 years ago

refs #58

fixed pep8, silenced via tox for migrations and settings

History

#1 Updated by Marco Marinello over 6 years ago

  • Status changed from Nuovo to In elaborazione
  • Assignee changed from Marco Marinello to Christopher R. Gabriel

Risolto nel commit cd3688e0

#2 Updated by Christopher R. Gabriel over 6 years ago

  • Status changed from In elaborazione to Commenti
  • Assignee changed from Christopher R. Gabriel to Marco Marinello

Vedo che il commit risolve solo l'esempio in questione, ma tutto il resto del codice non e' stato sistemato.

Questi gli errori/problemi rilevati:

./fabfile.py:6:1: E302 expected 2 blank lines, found 1
./fabfile.py:17:1: W293 blank line contains whitespace
./fabfile.py:17:1: W391 blank line at end of file
./hearings/admin.py:9:1: E303 too many blank lines (3)
./hearings/admin.py:20:1: E302 expected 2 blank lines, found 1
./hearings/admin.py:26:30: E231 missing whitespace after ','
./hearings/admin.py:26:36: E231 missing whitespace after ','
./hearings/admin.py:26:44: E231 missing whitespace after ','
./hearings/admin.py:26:50: E231 missing whitespace after ','
./hearings/admin.py:30:1: E302 expected 2 blank lines, found 1
./hearings/admin.py:39:1: E302 expected 2 blank lines, found 1
./hearings/forms.py:14:80: E501 line too long (106 > 79 characters)
./hearings/forms.py:40:9: E265 block comment should start with '# '
./hearings/models.py:26:1: E302 expected 2 blank lines, found 1
./hearings/models.py:27:80: E501 line too long (83 > 79 characters)
./hearings/models.py:29:80: E501 line too long (99 > 79 characters)
./hearings/models.py:31:80: E501 line too long (88 > 79 characters)
./hearings/models.py:34:80: E501 line too long (92 > 79 characters)
./hearings/models.py:54:1: W293 blank line contains whitespace
./hearings/models.py:56:80: E501 line too long (86 > 79 characters)
./hearings/models.py:65:5: E301 expected 1 blank line, found 0
./hearings/models.py:69:1: E302 expected 2 blank lines, found 1
./hearings/models.py:70:80: E501 line too long (82 > 79 characters)
./hearings/models.py:72:80: E501 line too long (97 > 79 characters)
./hearings/models.py:74:5: E301 expected 1 blank line, found 0
./hearings/models.py:78:1: W293 blank line contains whitespace
./hearings/models.py:81:80: E501 line too long (97 > 79 characters)
./hearings/models.py:87:80: E501 line too long (97 > 79 characters)
./hearings/models.py:100:80: E501 line too long (89 > 79 characters)
./hearings/models.py:137:1: W293 blank line contains whitespace
./hearings/models.py:139:1: W293 blank line contains whitespace
./hearings/models.py:140:1: E302 expected 2 blank lines, found 1
./hearings/models.py:147:80: E501 line too long (92 > 79 characters)
./hearings/models.py:149:80: E501 line too long (89 > 79 characters)
./hearings/models.py:151:80: E501 line too long (91 > 79 characters)
./hearings/models.py:160:1: W293 blank line contains whitespace
./hearings/models.py:175:1: W293 blank line contains whitespace
./hearings/models.py:176:5: E303 too many blank lines (2)
./hearings/models.py:193:5: E303 too many blank lines (2)
./hearings/models.py:229:80: E501 line too long (81 > 79 characters)
./hearings/models.py:232:1: W293 blank line contains whitespace
./hearings/models.py:234:5: E303 too many blank lines (2)
./hearings/models.py:253:5: E303 too many blank lines (2)
./hearings/models.py:261:1: E302 expected 2 blank lines, found 1
./hearings/models.py:268:1: E302 expected 2 blank lines, found 1
./hearings/models.py:271:1: W391 blank line at end of file
./hearings/urls.py:17:1: W293 blank line contains whitespace
./hearings/views.py:20:33: E225 missing whitespace around operator
./hearings/views.py:20:80: E501 line too long (86 > 79 characters)
./hearings/views.py:27:1: E302 expected 2 blank lines, found 1
./hearings/views.py:39:80: E501 line too long (94 > 79 characters)
./hearings/views.py:41:80: E501 line too long (108 > 79 characters)
./hearings/views.py:42:80: E501 line too long (117 > 79 characters)
./hearings/views.py:52:80: E501 line too long (93 > 79 characters)
./hearings/views.py:58:80: E501 line too long (116 > 79 characters)
./hearings/views.py:76:80: E501 line too long (94 > 79 characters)
./hearings/views.py:82:80: E501 line too long (89 > 79 characters)
./hearings/views.py:120:80: E501 line too long (94 > 79 characters)
./hearings/views.py:144:80: E501 line too long (99 > 79 characters)
./hearings/views.py:156:80: E501 line too long (94 > 79 characters)
./hearings/views.py:161:80: E501 line too long (87 > 79 characters)
./hearings/views.py:175:80: E501 line too long (93 > 79 characters)
./hearings/views.py:192:80: E501 line too long (86 > 79 characters)
./hearings/views.py:194:1: W293 blank line contains whitespace
./hearings/views.py:196:80: E501 line too long (107 > 79 characters)
./hearings/views.py:207:80: E501 line too long (93 > 79 characters)
./hearings/views.py:213:80: E501 line too long (96 > 79 characters)
./hearings/views.py:227:80: E501 line too long (93 > 79 characters)
./hearings/views.py:232:80: E501 line too long (85 > 79 characters)
./hearings/migrations/0001_initial.py:22:80: E501 line too long (114 > 79 characters)
./hearings/migrations/0001_initial.py:32:80: E501 line too long (114 > 79 characters)
./hearings/migrations/0001_initial.py:36:80: E501 line too long (85 > 79 characters)
./hearings/migrations/0001_initial.py:37:80: E501 line too long (150 > 79 characters)
./hearings/migrations/0001_initial.py:47:80: E501 line too long (114 > 79 characters)
./hearings/migrations/0001_initial.py:53:80: E501 line too long (114 > 79 characters)
./hearings/migrations/0001_initial.py:64:80: E501 line too long (114 > 79 characters)
./hearings/migrations/0001_initial.py:66:80: E501 line too long (149 > 79 characters)
./hearings/migrations/0001_initial.py:67:80: E501 line too long (145 > 79 characters)
./hearings/migrations/0001_initial.py:73:80: E501 line too long (132 > 79 characters)
./hearings/migrations/0001_initial.py:78:80: E501 line too long (136 > 79 characters)
./hearings/migrations/0001_initial.py:83:80: E501 line too long (142 > 79 characters)
./hearings/migrations/0001_initial.py:88:80: E501 line too long (144 > 79 characters)
./hearings/migrations/0001_initial.py:93:80: E501 line too long (138 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:19:80: E501 line too long (146 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:23:80: E501 line too long (130 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:27:80: E501 line too long (84 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:31:80: E501 line too long (103 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:35:80: E501 line too long (82 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:40:80: E501 line too long (168 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:45:80: E501 line too long (169 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:50:80: E501 line too long (162 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:75:80: E501 line too long (164 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:80:80: E501 line too long (156 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:85:80: E501 line too long (160 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:90:80: E501 line too long (85 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:95:80: E501 line too long (157 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:100:80: E501 line too long (87 > 79 characters)
./hearings/migrations/0002_auto_20160619_2131.py:105:80: E501 line too long (161 > 79 characters)
./pyhearing/context_processors.py:3:1: E302 expected 2 blank lines, found 1
./pyhearing/context_processors.py:6:1: W293 blank line contains whitespace
./pyhearing/context_processors.py:6:1: W391 blank line at end of file
./pyhearing/settings.py:100:15: E231 missing whitespace after ':'
./pyhearing/settings.py:100:80: E501 line too long (90 > 79 characters)
./pyhearing/settings.py:103:80: E501 line too long (81 > 79 characters)
./pyhearing/settings.py:106:80: E501 line too long (82 > 79 characters)
./pyhearing/settings.py:109:80: E501 line too long (83 > 79 characters)
./pyhearing/urls.py:33:1: E122 continuation line missing indentation or outdented
./pyhearing/urls.py:50:31: E203 whitespace before ':'
./pyhearing/urls.py:61:31: E203 whitespace before ':'
./pyhearing/urls.py:62:9: E128 continuation line under-indented for visual indent
./pyhearing/views.py:13:1: E302 expected 2 blank lines, found 1
./pyhearing/views.py:23:51: E225 missing whitespace around operator
./pyhearing/views.py:32:17: E128 continuation line under-indented for visual indent
./pyhearing/views.py:32:80: E501 line too long (109 > 79 characters)
./pyhearing/views.py:61:1: E302 expected 2 blank lines, found 1
./pyhearing/views.py:94:80: E501 line too long (134 > 79 characters)
./pyhearing/views.py:101:80: E501 line too long (86 > 79 characters)
./pyhearing/management/commands/import_csv_parent.py:9:1: E302 expected 2 blank lines, found 0
./pyhearing/management/commands/import_csv_parent.py:25:9: E301 expected 1 blank line, found 0
./pyhearing/management/commands/import_csv_parent.py:31:1: W293 blank line contains whitespace
./pyhearing/management/commands/import_csv_parent.py:36:1: W293 blank line contains whitespace
./pyhearing/management/commands/import_csv_teacher.py:9:1: E302 expected 2 blank lines, found 0
./pyhearing/management/commands/import_csv_teacher.py:25:9: E301 expected 1 blank line, found 0
./pyhearing/management/commands/import_csv_teacher.py:31:1: W293 blank line contains whitespace
./pyhearing/management/commands/import_csv_teacher.py:36:1: W293 blank line contains whitespace
./pyhearing/management/commands/import_csv_teacher.py:54:43: E251 unexpected spaces around keyword / parameter equals
./pyhearing/management/commands/import_csv_teacher.py:54:45: E251 unexpected spaces around keyword / parameter equals
./pyhearing/management/commands/import_csv_teacher.py:56:1: W293 blank line contains whitespace
./pyhearing/management/commands/reminders.py:8:1: E302 expected 2 blank lines, found 1
./pyhearing/management/commands/reminders.py:15:1: W293 blank line contains whitespace
./pyhearing/management/commands/reminders.py:17:9: E303 too many blank lines (2)
./pyhearing/management/commands/reminders.py:17:68: E251 unexpected spaces around keyword / parameter equals
./pyhearing/management/commands/reminders.py:17:70: E251 unexpected spaces around keyword / parameter equals
./pyhearing/management/commands/reminders.py:28:1: W293 blank line contains whitespace
./pyhearing/templatetags/pyhearingtags.py:9:1: E302 expected 2 blank lines, found 1

#3 Updated by Marco Marinello over 6 years ago

  • Assignee changed from Marco Marinello to Christopher R. Gabriel

Vedi commit ad0d2420

Tra i file indicati ce ne sono alcuni che non avevo toccato (come fabfile, context_processor) e alcuni non li ho corretti (come la management console e le migrations). Rimangono alcuni "errori" che ritengo non siano fixabili.

./pyhearing/settings.py:100:80: E501 line too long (91 > 79 characters)
./pyhearing/settings.py:103:80: E501 line too long (81 > 79 characters)
./pyhearing/settings.py:106:80: E501 line too long (82 > 79 characters)
./pyhearing/settings.py:109:80: E501 line too long (83 > 79 characters)
./pyhearing/views.py:39:80: E501 line too long (109 > 79 characters)

#4 Updated by Christopher R. Gabriel over 6 years ago

Ottimo, ne rimango ancora diversi pero' dopo il pull, anche per file che non hai toccato, per fare un porting ottimale.

./hearings/forms.py:16:13: E123 closing bracket does not match indentation of opening bracket's line
./hearings/forms.py:42:9: E123 closing bracket does not match indentation of opening bracket's line
./hearings/models.py:177:13: E123 closing bracket does not match indentation of opening bracket's line
./hearings/models.py:206:13: E123 closing bracket does not match indentation of opening bracket's line
./hearings/models.py:227:13: E123 closing bracket does not match indentation of opening bracket's line
./hearings/models.py:265:13: E123 closing bracket does not match indentation of opening bracket's line
./hearings/views.py:25:9: E123 closing bracket does not match indentation of opening bracket's line
./pyhearing/views.py:28:35: E123 closing bracket does not match indentation of opening bracket's line
./pyhearing/views.py:108:21: E123 closing bracket does not match indentation of opening bracket's line
./pyhearing/management/commands/import_csv_parent.py:9:1: E302 expected 2 blank lines, found 0
./pyhearing/management/commands/import_csv_parent.py:25:9: E301 expected 1 blank line, found 0
./pyhearing/management/commands/import_csv_parent.py:31:1: W293 blank line contains whitespace
./pyhearing/management/commands/import_csv_parent.py:36:1: W293 blank line contains whitespace
./pyhearing/management/commands/import_csv_teacher.py:9:1: E302 expected 2 blank lines, found 0
./pyhearing/management/commands/import_csv_teacher.py:25:9: E301 expected 1 blank line, found 0
./pyhearing/management/commands/import_csv_teacher.py:31:1: W293 blank line contains whitespace
./pyhearing/management/commands/import_csv_teacher.py:36:1: W293 blank line contains whitespace
./pyhearing/management/commands/import_csv_teacher.py:54:43: E251 unexpected spaces around keyword / parameter equals
./pyhearing/management/commands/import_csv_teacher.py:54:45: E251 unexpected spaces around keyword / parameter equals
./pyhearing/management/commands/import_csv_teacher.py:56:1: W293 blank line contains whitespace
./pyhearing/management/commands/reminders.py:8:1: E302 expected 2 blank lines, found 1
./pyhearing/management/commands/reminders.py:15:1: W293 blank line contains whitespace
./pyhearing/management/commands/reminders.py:17:9: E303 too many blank lines (2)
./pyhearing/management/commands/reminders.py:17:68: E251 unexpected spaces around keyword / parameter equals
./pyhearing/management/commands/reminders.py:17:70: E251 unexpected spaces around keyword / parameter equals
./pyhearing/management/commands/reminders.py:28:1: W293 blank line contains whitespace

#5 Updated by Christopher R. Gabriel over 6 years ago

  • Assignee changed from Christopher R. Gabriel to Marco Marinello

#6 Updated by Marco Marinello over 6 years ago

  • Assignee changed from Marco Marinello to Christopher R. Gabriel

Il mio pep8 non da alcun errore sul file forms.py .
Lo stesso sui models.py e views.py .
Il resto lo correggo.

#7 Updated by Christopher R. Gabriel over 6 years ago

  • Status changed from Commenti to In elaborazione
  • Assignee changed from Christopher R. Gabriel to Marco Marinello

Ok, riassegna a me solo se devo fare qualcosa.

Io uso pep8 1.5.7, escludendo solo E501.

#8 Updated by Marco Marinello over 6 years ago

Management console sistemata d549ed56

#9 Updated by Marco Marinello over 6 years ago

  • Assignee deleted (Marco Marinello)

#10 Updated by Christopher R. Gabriel over 6 years ago

  • Assignee set to Marco Marinello

E' stato lasciato in elaborazione, ma togliendo l'assegnatario. Chi e' che lo sta elaborando?

#11 Updated by Marco Marinello over 6 years ago

  • Status changed from In elaborazione to Commenti
  • Assignee deleted (Marco Marinello)
  • Priority changed from Normale to Bassa

Io, al momento, no. Inoltre, esclusi i file migrations, non ho altre segnalazioni di errori da parte di pep8 (tutti gli errori considerati, versione 1.5.7)

#12 Updated by Christopher R. Gabriel over 6 years ago

  • Status changed from Commenti to Chiuso
  • Resolution set to fixed

Ok, allora meglio se veniva assegnato con stato Commenti.

Se togli l'assegnatario, nessuno ci guarda poi... perche' non risulta in carico a nessuno.

Chiudo, rimangono due cose in views e settings, ma sorvoliamo.

Also available in: Atom PDF