26 Constructor |
26 Constructor |
27 |
27 |
28 @param filename name of the file |
28 @param filename name of the file |
29 @type str |
29 @type str |
30 @param loc location of the issue |
30 @param loc location of the issue |
|
31 @type tuple of (int, int) |
31 """ |
32 """ |
32 self.filename = filename |
33 self.filename = filename |
33 self.lineno = loc.lineno |
34 self.lineno = loc.lineno |
34 self.col = loc.col_offset |
35 self.col = loc.col_offset |
35 |
36 |
71 |
72 |
72 def __init__(self, filename, loc, name): |
73 def __init__(self, filename, loc, name): |
73 """ |
74 """ |
74 Constructor |
75 Constructor |
75 |
76 |
76 @param filename name of the file (string) |
77 @param filename name of the file |
77 @param loc location of the issue |
78 @type str |
78 @param name name of the unused import (string) |
79 @param loc location of the issue |
|
80 @type tuple of (int, int) |
|
81 @param name name of the unused import |
|
82 @type str |
79 """ |
83 """ |
80 Message.__init__(self, filename, loc) |
84 Message.__init__(self, filename, loc) |
81 self.message_args = (name,) |
85 self.message_args = (name,) |
82 |
86 |
83 |
87 |
91 |
95 |
92 def __init__(self, filename, loc, name, orig_loc): |
96 def __init__(self, filename, loc, name, orig_loc): |
93 """ |
97 """ |
94 Constructor |
98 Constructor |
95 |
99 |
96 @param filename name of the file (string) |
100 @param filename name of the file |
97 @param loc location of the issue |
101 @type str |
98 @param name name of the redefined object (string) |
102 @param loc location of the issue |
|
103 @type tuple of (int, int) |
|
104 @param name name of the redefined object |
|
105 @type str |
99 @param orig_loc location of the original definition |
106 @param orig_loc location of the original definition |
|
107 @type tuple of (int, int) |
100 """ |
108 """ |
101 Message.__init__(self, filename, loc) |
109 Message.__init__(self, filename, loc) |
102 self.message_args = (name, orig_loc.lineno) |
110 self.message_args = (name, orig_loc.lineno) |
103 |
111 |
104 |
112 |
112 |
120 |
113 def __init__(self, filename, loc, name, orig_loc): |
121 def __init__(self, filename, loc, name, orig_loc): |
114 """ |
122 """ |
115 Constructor |
123 Constructor |
116 |
124 |
117 @param filename name of the file (string) |
125 @param filename name of the file |
118 @param loc location of the issue |
126 @type str |
119 @param name name of the shadowed import (string) |
127 @param loc location of the issue |
|
128 @type tuple of (int, int) |
|
129 @param name name of the shadowed import |
|
130 @type str |
120 @param orig_loc location of the import |
131 @param orig_loc location of the import |
|
132 @type tuple of (int, int) |
121 """ |
133 """ |
122 Message.__init__(self, filename, loc) |
134 Message.__init__(self, filename, loc) |
123 self.message_args = (name, orig_loc.lineno) |
135 self.message_args = (name, orig_loc.lineno) |
124 |
136 |
125 |
137 |
133 |
145 |
134 def __init__(self, filename, loc, modname): |
146 def __init__(self, filename, loc, modname): |
135 """ |
147 """ |
136 Constructor |
148 Constructor |
137 |
149 |
138 @param filename name of the file (string) |
150 @param filename name of the file |
139 @param loc location of the issue |
151 @type str |
140 @param modname name of the module (string) |
152 @param loc location of the issue |
|
153 @type tuple of (int, int) |
|
154 @param modname name of the module |
|
155 @type str |
141 """ |
156 """ |
142 Message.__init__(self, filename, loc) |
157 Message.__init__(self, filename, loc) |
143 self.message_args = (modname,) |
158 self.message_args = (modname,) |
144 |
159 |
145 |
160 |
153 |
168 |
154 def __init__(self, filename, loc, modname): |
169 def __init__(self, filename, loc, modname): |
155 """ |
170 """ |
156 Constructor |
171 Constructor |
157 |
172 |
158 @param filename name of the file (string) |
173 @param filename name of the file |
159 @param loc location of the issue |
174 @type str |
160 @param modname name of the module imported using star import (string) |
175 @param loc location of the issue |
|
176 @type tuple of (int, int) |
|
177 @param modname name of the module imported using star import |
|
178 @type str |
161 """ |
179 """ |
162 Message.__init__(self, filename, loc) |
180 Message.__init__(self, filename, loc) |
163 self.message_args = (modname,) |
181 self.message_args = (modname,) |
164 |
182 |
165 |
183 |
173 |
191 |
174 def __init__(self, filename, loc, name, from_list): |
192 def __init__(self, filename, loc, name, from_list): |
175 """ |
193 """ |
176 Constructor |
194 Constructor |
177 |
195 |
178 @param filename name of the file (string) |
196 @param filename name of the file |
179 @param loc location of the issue |
197 @type str |
180 @param name name of the variable (string) |
198 @param loc location of the issue |
181 @param from_list list of modules imported from with * (string) |
199 @type tuple of (int, int) |
|
200 @param name name of the variable |
|
201 @type str |
|
202 @param from_list list of modules imported from with * |
|
203 @type str |
182 """ |
204 """ |
183 Message.__init__(self, filename, loc) |
205 Message.__init__(self, filename, loc) |
184 self.message_args = (name, from_list) |
206 self.message_args = (name, from_list) |
185 |
207 |
186 |
208 |
194 |
216 |
195 def __init__(self, filename, loc, name): |
217 def __init__(self, filename, loc, name): |
196 """ |
218 """ |
197 Constructor |
219 Constructor |
198 |
220 |
199 @param filename name of the file (string) |
221 @param filename name of the file |
200 @param loc location of the issue |
222 @type str |
201 @param name undefined name (string) |
223 @param loc location of the issue |
|
224 @type tuple of (int, int) |
|
225 @param name undefined name |
|
226 @type str |
202 """ |
227 """ |
203 Message.__init__(self, filename, loc) |
228 Message.__init__(self, filename, loc) |
204 self.message_args = (name,) |
229 self.message_args = (name,) |
205 |
230 |
206 |
231 |
214 |
239 |
215 def __init__(self, filename, loc, position=None): |
240 def __init__(self, filename, loc, position=None): |
216 """ |
241 """ |
217 Constructor |
242 Constructor |
218 |
243 |
219 @param filename name of the file (string) |
244 @param filename name of the file |
220 @param loc location of the issue |
245 @type str |
|
246 @param loc location of the issue |
|
247 @type tuple of (int, int) |
221 @param position position of the syntax error |
248 @param position position of the syntax error |
|
249 @type tuple of (int, int) |
222 """ |
250 """ |
223 Message.__init__(self, filename, loc) |
251 Message.__init__(self, filename, loc) |
224 if position: |
252 if position: |
225 (self.lineno, self.col) = position |
253 (self.lineno, self.col) = position |
226 self.message_args = () |
254 self.message_args = () |
236 |
264 |
237 def __init__(self, filename, loc, name): |
265 def __init__(self, filename, loc, name): |
238 """ |
266 """ |
239 Constructor |
267 Constructor |
240 |
268 |
241 @param filename name of the file (string) |
269 @param filename name of the file |
242 @param loc location of the issue |
270 @type str |
243 @param name undefined exported name (string) |
271 @param loc location of the issue |
|
272 @type tuple of (int, int) |
|
273 @param name undefined exported name |
|
274 @type str |
244 """ |
275 """ |
245 Message.__init__(self, filename, loc) |
276 Message.__init__(self, filename, loc) |
246 self.message_args = (name,) |
277 self.message_args = (name,) |
247 |
278 |
248 |
279 |
259 |
290 |
260 def __init__(self, filename, loc, name, orig_loc): |
291 def __init__(self, filename, loc, name, orig_loc): |
261 """ |
292 """ |
262 Constructor |
293 Constructor |
263 |
294 |
264 @param filename name of the file (string) |
295 @param filename name of the file |
265 @param loc location of the issue |
296 @type str |
266 @param name name of the prematurely referenced variable (string) |
297 @param loc location of the issue |
|
298 @type tuple of (int, int) |
|
299 @param name name of the prematurely referenced variable |
|
300 @type str |
267 @param orig_loc location of the variable definition |
301 @param orig_loc location of the variable definition |
|
302 @type tuple of (int, int) |
268 """ |
303 """ |
269 Message.__init__(self, filename, loc) |
304 Message.__init__(self, filename, loc) |
270 if orig_loc is None: |
305 if orig_loc is None: |
271 self.message = self.message.format(self.builtin) |
306 self.message = self.message.format(self.builtin) |
272 self.message_args = (name,) |
307 self.message_args = (name,) |
287 |
322 |
288 def __init__(self, filename, loc, name): |
323 def __init__(self, filename, loc, name): |
289 """ |
324 """ |
290 Constructor |
325 Constructor |
291 |
326 |
292 @param filename name of the file (string) |
327 @param filename name of the file |
293 @param loc location of the issue |
328 @type str |
294 @param name name of the duplicate argument (string) |
329 @param loc location of the issue |
|
330 @type tuple of (int, int) |
|
331 @param name name of the duplicate argument |
|
332 @type str |
295 """ |
333 """ |
296 Message.__init__(self, filename, loc) |
334 Message.__init__(self, filename, loc) |
297 self.message_args = (name,) |
335 self.message_args = (name,) |
298 |
336 |
299 |
337 |
307 |
345 |
308 def __init__(self, filename, loc, key): |
346 def __init__(self, filename, loc, key): |
309 """ |
347 """ |
310 Constructor |
348 Constructor |
311 |
349 |
312 @param filename name of the file (string) |
350 @param filename name of the file |
313 @param loc location of the issue |
351 @type str |
314 @param key dictionary key (string) |
352 @param loc location of the issue |
|
353 @type tuple of (int, int) |
|
354 @param key dictionary key |
|
355 @type str |
315 """ |
356 """ |
316 Message.__init__(self, filename, loc) |
357 Message.__init__(self, filename, loc) |
317 self.message_args = (key,) |
358 self.message_args = (key,) |
318 |
359 |
319 |
360 |
327 |
368 |
328 def __init__(self, filename, loc, key): |
369 def __init__(self, filename, loc, key): |
329 """ |
370 """ |
330 Constructor |
371 Constructor |
331 |
372 |
332 @param filename name of the file (string) |
373 @param filename name of the file |
333 @param loc location of the issue |
374 @type str |
334 @param key dictionary key variable (string) |
375 @param loc location of the issue |
|
376 @type tuple of (int, int) |
|
377 @param key dictionary key variable |
|
378 @type str |
335 """ |
379 """ |
336 Message.__init__(self, filename, loc) |
380 Message.__init__(self, filename, loc) |
337 self.message_args = (key,) |
381 self.message_args = (key,) |
338 |
382 |
339 |
383 |
356 |
400 |
357 def __init__(self, filename, loc, name): |
401 def __init__(self, filename, loc, name): |
358 """ |
402 """ |
359 Constructor |
403 Constructor |
360 |
404 |
361 @param filename name of the file (string) |
405 @param filename name of the file |
362 @param loc location of the issue |
406 @type str |
363 @param name name of the imported undefined future feature (string) |
407 @param loc location of the issue |
|
408 @type tuple of (int, int) |
|
409 @param name name of the imported undefined future feature |
|
410 @type str |
364 """ |
411 """ |
365 Message.__init__(self, filename, loc) |
412 Message.__init__(self, filename, loc) |
366 self.message_args = (name,) |
413 self.message_args = (name,) |
367 |
414 |
368 |
415 |
379 |
426 |
380 def __init__(self, filename, loc, names): |
427 def __init__(self, filename, loc, names): |
381 """ |
428 """ |
382 Constructor |
429 Constructor |
383 |
430 |
384 @param filename name of the file (string) |
431 @param filename name of the file |
385 @param loc location of the issue |
432 @type str |
386 @param names names of unused variable (string) |
433 @param loc location of the issue |
|
434 @type tuple of (int, int) |
|
435 @param names names of unused variable |
|
436 @type str |
387 """ |
437 """ |
388 Message.__init__(self, filename, loc) |
438 Message.__init__(self, filename, loc) |
389 self.message_args = (names,) |
439 self.message_args = (names,) |
390 |
440 |
391 |
441 |
402 |
452 |
403 def __init__(self, filename, loc, names): |
453 def __init__(self, filename, loc, names): |
404 """ |
454 """ |
405 Constructor |
455 Constructor |
406 |
456 |
407 @param filename name of the file (string) |
457 @param filename name of the file |
408 @param loc location of the issue |
458 @type str |
409 @param names names of unused variable (string) |
459 @param loc location of the issue |
|
460 @type tuple of (int, int) |
|
461 @param names names of unused variable |
|
462 @type str |
410 """ |
463 """ |
411 Message.__init__(self, filename, loc) |
464 Message.__init__(self, filename, loc) |
412 self.message_args = (names,) |
465 self.message_args = (names,) |
413 |
466 |
414 |
467 |
523 |
576 |
524 def __init__(self, filename, loc, annotation): |
577 def __init__(self, filename, loc, annotation): |
525 """ |
578 """ |
526 Constructor |
579 Constructor |
527 |
580 |
528 @param filename name of the file (string) |
581 @param filename name of the file |
529 @param loc location of the issue |
582 @type str |
530 @param annotation erroneous forward annotation (string) |
583 @param loc location of the issue |
|
584 @type tuple of (int, int) |
|
585 @param annotation erroneous forward annotation |
|
586 @type str |
531 """ |
587 """ |
532 Message.__init__(self, filename, loc) |
588 Message.__init__(self, filename, loc) |
533 self.message_args = (annotation,) |
589 self.message_args = (annotation,) |
534 |
590 |
535 |
591 |
589 |
645 |
590 def __init__(self, filename, loc, extra_positions): |
646 def __init__(self, filename, loc, extra_positions): |
591 """ |
647 """ |
592 Constructor |
648 Constructor |
593 |
649 |
594 @param filename name of the file (string) |
650 @param filename name of the file |
595 @param loc location of the issue |
651 @type str |
|
652 @param loc location of the issue |
|
653 @type tuple of (int, int) |
596 @param extra_positions indexes of unused arguments |
654 @param extra_positions indexes of unused arguments |
|
655 @type list of int |
597 """ |
656 """ |
598 Message.__init__(self, filename, loc) |
657 Message.__init__(self, filename, loc) |
599 self.message_args = (extra_positions,) |
658 self.message_args = (extra_positions,) |
600 |
659 |
601 |
660 |
611 |
670 |
612 def __init__(self, filename, loc, extra_keywords): |
671 def __init__(self, filename, loc, extra_keywords): |
613 """ |
672 """ |
614 Constructor |
673 Constructor |
615 |
674 |
616 @param filename name of the file (string) |
675 @param filename name of the file |
617 @param loc location of the issue |
676 @type str |
|
677 @param loc location of the issue |
|
678 @type tuple of (int, int) |
618 @param extra_keywords index of unused named arguments |
679 @param extra_keywords index of unused named arguments |
|
680 @type list of str |
619 """ |
681 """ |
620 Message.__init__(self, filename, loc) |
682 Message.__init__(self, filename, loc) |
621 self.message_args = (extra_keywords,) |
683 self.message_args = (extra_keywords,) |
622 |
684 |
623 |
685 |
633 |
695 |
634 def __init__(self, filename, loc, missing_arguments): |
696 def __init__(self, filename, loc, missing_arguments): |
635 """ |
697 """ |
636 Constructor |
698 Constructor |
637 |
699 |
638 @param filename name of the file (string) |
700 @param filename name of the file |
639 @param loc location of the issue |
701 @type str |
|
702 @param loc location of the issue |
|
703 @type tuple of (int, int) |
640 @param missing_arguments missing arguments |
704 @param missing_arguments missing arguments |
|
705 @type list of str |
641 """ |
706 """ |
642 Message.__init__(self, filename, loc) |
707 Message.__init__(self, filename, loc) |
643 self.message_args = (missing_arguments,) |
708 self.message_args = (missing_arguments,) |
644 |
709 |
645 |
710 |
666 |
731 |
667 def __init__(self, filename, loc, error): |
732 def __init__(self, filename, loc, error): |
668 """ |
733 """ |
669 Constructor |
734 Constructor |
670 |
735 |
671 @param filename name of the file (string) |
736 @param filename name of the file |
672 @param loc location of the issue |
737 @type str |
|
738 @param loc location of the issue |
|
739 @type tuple of (int, int) |
673 @param error error details |
740 @param error error details |
|
741 @type str |
674 """ |
742 """ |
675 Message.__init__(self, filename, loc) |
743 Message.__init__(self, filename, loc) |
676 if not isinstance(error, str): |
744 if not isinstance(error, str): |
677 error = str(error) |
745 error = str(error) |
678 self.message_args = (error,) |
746 self.message_args = (error,) |
690 |
758 |
691 def __init__(self, filename, loc, error): |
759 def __init__(self, filename, loc, error): |
692 """ |
760 """ |
693 Constructor |
761 Constructor |
694 |
762 |
695 @param filename name of the file (string) |
763 @param filename name of the file |
696 @param loc location of the issue |
764 @type str |
|
765 @param loc location of the issue |
|
766 @type tuple of (int, int) |
697 @param error error details |
767 @param error error details |
|
768 @type str |
698 """ |
769 """ |
699 Message.__init__(self, filename, loc) |
770 Message.__init__(self, filename, loc) |
700 self.message_args = (error,) |
771 self.message_args = (error,) |
701 |
772 |
702 |
773 |
724 |
795 |
725 def __init__(self, filename, loc, c): |
796 def __init__(self, filename, loc, c): |
726 """ |
797 """ |
727 Constructor |
798 Constructor |
728 |
799 |
729 @param filename name of the file (string) |
800 @param filename name of the file |
730 @param loc location of the issue |
801 @type str |
|
802 @param loc location of the issue |
|
803 @type tuple of (int, int) |
731 @param c unsupported format character |
804 @param c unsupported format character |
|
805 @type str |
732 """ |
806 """ |
733 Message.__init__(self, filename, loc) |
807 Message.__init__(self, filename, loc) |
734 self.message_args = (c,) |
808 self.message_args = (c,) |
735 |
809 |
736 |
810 |
747 |
821 |
748 def __init__(self, filename, loc, n_placeholders, n_substitutions): |
822 def __init__(self, filename, loc, n_placeholders, n_substitutions): |
749 """ |
823 """ |
750 Constructor |
824 Constructor |
751 |
825 |
752 @param filename name of the file (string) |
826 @param filename name of the file |
753 @param loc location of the issue |
827 @type str |
754 @param n_placeholders number of placeholders (integer) |
828 @param loc location of the issue |
755 @param n_substitutions number of substitutions (integer) |
829 @type tuple of (int, int) |
|
830 @param n_placeholders number of placeholders |
|
831 @type int |
|
832 @param n_substitutions number of substitutions |
|
833 @type int |
756 """ |
834 """ |
757 Message.__init__(self, filename, loc) |
835 Message.__init__(self, filename, loc) |
758 self.message_args = (n_placeholders, n_substitutions) |
836 self.message_args = (n_placeholders, n_substitutions) |
759 |
837 |
760 |
838 |
770 |
848 |
771 def __init__(self, filename, loc, extra_keywords): |
849 def __init__(self, filename, loc, extra_keywords): |
772 """ |
850 """ |
773 Constructor |
851 Constructor |
774 |
852 |
775 @param filename name of the file (string) |
853 @param filename name of the file |
776 @param loc location of the issue |
854 @type str |
|
855 @param loc location of the issue |
|
856 @type tuple of (int, int) |
777 @param extra_keywords index of unused named arguments |
857 @param extra_keywords index of unused named arguments |
|
858 @type list of str |
778 """ |
859 """ |
779 Message.__init__(self, filename, loc) |
860 Message.__init__(self, filename, loc) |
780 self.message_args = (extra_keywords,) |
861 self.message_args = (extra_keywords,) |
781 |
862 |
782 |
863 |
792 |
873 |
793 def __init__(self, filename, loc, missing_arguments): |
874 def __init__(self, filename, loc, missing_arguments): |
794 """ |
875 """ |
795 Constructor |
876 Constructor |
796 |
877 |
797 @param filename name of the file (string) |
878 @param filename name of the file |
798 @param loc location of the issue |
879 @type str |
|
880 @param loc location of the issue |
|
881 @type tuple of (int, int) |
799 @param missing_arguments missing arguments |
882 @param missing_arguments missing arguments |
|
883 @type list of str |
800 """ |
884 """ |
801 Message.__init__(self, filename, loc) |
885 Message.__init__(self, filename, loc) |
802 self.message_args = (missing_arguments,) |
886 self.message_args = (missing_arguments,) |
803 |
887 |
804 |
888 |