Closed saraedum closed 1 year ago
Some of this are false positive but most seem to be legit (or at least point out strange patterns in our code):
************* Module flatsurf.graphical.hyperbolic
flatsurf/graphical/hyperbolic.py:1035:36: E1120: No value for argument 'geometry' in constructor call (no-value-for-parameter)
flatsurf/graphical/hyperbolic.py:1035:36: E1120: No value for argument 'category' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.half_translation_surface
flatsurf/geometry/half_translation_surface.py:156:17: E0602: Undefined variable 'islice' (undefined-variable)
************* Module flatsurf.geometry.similarity_surface
flatsurf/geometry/similarity_surface.py:171:15: E1120: No value for argument 'ncols' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity_surface.py:171:15: E1120: No value for argument 'sparse' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity_surface.py:171:15: E1120: No value for argument 'implementation' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity_surface.py:433:12: E0401: Unable to import 'warning' (import-error)
flatsurf/geometry/similarity_surface.py:2605:19: E0203: Access to member '_hash' before its definition line 2612 (access-member-before-definition)
************* Module flatsurf.geometry.similarity
flatsurf/geometry/similarity.py:43:4: E0401: Unable to import 'sage.matrix.matrix' (import-error)
flatsurf/geometry/similarity.py:176:4: E0213: Method '_mul_' should have "self" as first argument (no-self-argument)
flatsurf/geometry/similarity.py:232:4: E0213: Method '_div_' should have "self" as first argument (no-self-argument)
flatsurf/geometry/similarity.py:294:44: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity.py:464:38: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity.py:470:15: E1120: No value for argument 'ncols' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity.py:470:15: E1120: No value for argument 'sparse' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity.py:470:15: E1120: No value for argument 'implementation' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity.py:476:15: E1120: No value for argument 'ncols' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity.py:476:15: E1120: No value for argument 'sparse' in constructor call (no-value-for-parameter)
flatsurf/geometry/similarity.py:476:15: E1120: No value for argument 'implementation' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.relative_homology
flatsurf/geometry/relative_homology.py:75:16: E0602: Undefined variable 'cmp' (undefined-variable)
flatsurf/geometry/relative_homology.py:121:11: E0602: Undefined variable 'instanceof' (undefined-variable)
flatsurf/geometry/relative_homology.py:134:19: E0602: Undefined variable 'cmp' (undefined-variable)
flatsurf/geometry/relative_homology.py:135:12: E0602: Undefined variable 'cmp' (undefined-variable)
flatsurf/geometry/relative_homology.py:138:15: E0602: Undefined variable 'cmp' (undefined-variable)
************* Module flatsurf.geometry.subfield
flatsurf/geometry/subfield.py:157:45: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
flatsurf/geometry/subfield.py:167:49: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.polygon
flatsurf/geometry/polygon.py:616:30: E1120: No value for argument 'ncols' in constructor call (no-value-for-parameter)
flatsurf/geometry/polygon.py:616:30: E1120: No value for argument 'sparse' in constructor call (no-value-for-parameter)
flatsurf/geometry/polygon.py:616:30: E1120: No value for argument 'implementation' in constructor call (no-value-for-parameter)
flatsurf/geometry/polygon.py:990:16: E0602: Undefined variable 't' (undefined-variable)
flatsurf/geometry/polygon.py:1976:23: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
flatsurf/geometry/polygon.py:2623:28: E0601: Using variable 'coeffs' before assignment (used-before-assignment)
flatsurf/geometry/polygon.py:2884:23: E1120: No value for argument 'nb_fake_zeros' in constructor call (no-value-for-parameter)
flatsurf/geometry/polygon.py:2886:23: E1120: No value for argument 'nb_fake_zeros' in constructor call (no-value-for-parameter)
flatsurf/geometry/polygon.py:2896:19: E1120: No value for argument 'nb_poles' in constructor call (no-value-for-parameter)
flatsurf/geometry/polygon.py:2896:19: E1120: No value for argument 'nb_fake_zeros' in constructor call (no-value-for-parameter)
flatsurf/geometry/polygon.py:3257:69: E0601: Using variable 'lengths' before assignment (used-before-assignment)
flatsurf/geometry/polygon.py:3289:15: E0601: Using variable 'length' before assignment (used-before-assignment)
flatsurf/geometry/polygon.py:3337:24: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.mappings
flatsurf/geometry/mappings.py:154:8: E1120: No value for argument 'base_ring' in unbound method call (no-value-for-parameter)
flatsurf/geometry/mappings.py:154:8: E1120: No value for argument 'base_label' in unbound method call (no-value-for-parameter)
flatsurf/geometry/mappings.py:154:8: E1120: No value for argument 'finite' in unbound method call (no-value-for-parameter)
flatsurf/geometry/mappings.py:154:8: E1120: No value for argument 'mutable' in unbound method call (no-value-for-parameter)
************* Module flatsurf.geometry.hyperbolic
flatsurf/geometry/hyperbolic.py:496:17: E1101: Module 'sage.structure.element' has no 'parent' member (no-member)
flatsurf/geometry/hyperbolic.py:565:15: E1120: No value for argument 'category' in constructor call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:835:21: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:2535:27: E1130: bad operand type for unary ~: NoneType (invalid-unary-operand-type)
flatsurf/geometry/hyperbolic.py:2948:23: E1120: No value for argument 'image' in method call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:2948:23: E1120: No value for argument 'defining' in method call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:2951:23: E1120: No value for argument 'image' in method call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:2951:23: E1120: No value for argument 'defining' in method call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:3093:13: E1120: No value for argument 'sparse' in constructor call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:3093:13: E1120: No value for argument 'implementation' in constructor call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:3632:4: E0213: Method 'change_ring' should have "self" as first argument (no-self-argument)
flatsurf/geometry/hyperbolic.py:5472:40: E1130: bad operand type for unary -: HyperbolicConvexSet (invalid-unary-operand-type)
flatsurf/geometry/hyperbolic.py:5475:39: E1130: bad operand type for unary -: HyperbolicConvexSet (invalid-unary-operand-type)
flatsurf/geometry/hyperbolic.py:7939:16: E1130: bad operand type for unary -: HyperbolicOrientedGeodesic (invalid-unary-operand-type)
flatsurf/geometry/hyperbolic.py:7981:16: E1130: bad operand type for unary -: HyperbolicOrientedGeodesic (invalid-unary-operand-type)
flatsurf/geometry/hyperbolic.py:8977:21: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:9645:44: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
flatsurf/geometry/hyperbolic.py:10440:31: E1101: Instance of 'bool' has no 'is_finite' member (no-member)
flatsurf/geometry/hyperbolic.py:10686:35: E1130: bad operand type for unary -: PlusInfinity (invalid-unary-operand-type)
flatsurf/geometry/hyperbolic.py:10686:35: E1130: bad operand type for unary -: MinusInfinity (invalid-unary-operand-type)
************* Module flatsurf.geometry.tangent_bundle
flatsurf/geometry/tangent_bundle.py:169:8: E0711: NotImplemented raised - should raise NotImplementedError (notimplemented-raised)
flatsurf/geometry/tangent_bundle.py:169:8: E0702: Raising NotImplementedType while only classes or instances are allowed (raising-bad-type)
flatsurf/geometry/tangent_bundle.py:438:49: E0602: Undefined variable 'v' (undefined-variable)
flatsurf/geometry/tangent_bundle.py:438:68: E0602: Undefined variable 'v' (undefined-variable)
flatsurf/geometry/tangent_bundle.py:521:49: E0602: Undefined variable 'v' (undefined-variable)
flatsurf/geometry/tangent_bundle.py:521:68: E0602: Undefined variable 'v' (undefined-variable)
************* Module flatsurf.geometry.fundamental_group
flatsurf/geometry/fundamental_group.py:300:38: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.mega_wollmilchsau
flatsurf/geometry/mega_wollmilchsau.py:96:38: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.surface_objects
flatsurf/geometry/surface_objects.py:410:31: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type)
flatsurf/geometry/surface_objects.py:415:35: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type)
flatsurf/geometry/surface_objects.py:594:19: E0203: Access to member '_traj' before its definition line 606 (access-member-before-definition)
flatsurf/geometry/surface_objects.py:771:12: E0711: NotImplemented raised - should raise NotImplementedError (notimplemented-raised)
flatsurf/geometry/surface_objects.py:771:18: E1102: NotImplemented is not callable (not-callable)
flatsurf/geometry/surface_objects.py:1048:14: E0602: Undefined variable 'ValuError' (undefined-variable)
flatsurf/geometry/surface_objects.py:1065:14: E0602: Undefined variable 'ValuError' (undefined-variable)
************* Module flatsurf.geometry.chamanara
flatsurf/geometry/chamanara.py:36:20: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.gl2r_orbit_closure
flatsurf/geometry/gl2r_orbit_closure.py:173:18: E1120: No value for argument 'coordinate' in constructor call (no-value-for-parameter)
flatsurf/geometry/gl2r_orbit_closure.py:272:15: E1120: No value for argument 'nb_fake_zeros' in constructor call (no-value-for-parameter)
flatsurf/geometry/gl2r_orbit_closure.py:434:38: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.pyflatsurf_conversion
flatsurf/geometry/pyflatsurf_conversion.py:141:8: E1120: No value for argument 'coordinate' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.half_dilation_surface
flatsurf/geometry/half_dilation_surface.py:30:4: E0401: Unable to import 'sage.matrix.matrix' (import-error)
************* Module flatsurf.geometry.surface
flatsurf/geometry/surface.py:142:28: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
flatsurf/geometry/surface.py:733:46: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
flatsurf/geometry/surface.py:671:19: E0203: Access to member '_hash' before its definition line 681 (access-member-before-definition)
************* Module flatsurf.geometry.straight_line_trajectory
flatsurf/geometry/straight_line_trajectory.py:230:16: E1101: Instance of 'AbstractStraightLineTrajectory' has no 'segment' member (no-member)
flatsurf/geometry/straight_line_trajectory.py:231:14: E1101: Instance of 'AbstractStraightLineTrajectory' has no 'segment' member (no-member)
flatsurf/geometry/straight_line_trajectory.py:233:12: E1101: Instance of 'AbstractStraightLineTrajectory' has no 'combinatorial_length' member (no-member)
flatsurf/geometry/straight_line_trajectory.py:310:15: E1101: Instance of 'AbstractStraightLineTrajectory' has no 'is_closed' member (no-member)
flatsurf/geometry/straight_line_trajectory.py:385:19: E1101: Instance of 'AbstractStraightLineTrajectory' has no 'segments' member (no-member)
flatsurf/geometry/straight_line_trajectory.py:420:15: E1101: Instance of 'AbstractStraightLineTrajectory' has no 'segment' member (no-member)
flatsurf/geometry/straight_line_trajectory.py:423:15: E1101: Instance of 'AbstractStraightLineTrajectory' has no 'segment' member (no-member)
flatsurf/geometry/straight_line_trajectory.py:474:20: E1101: Instance of 'AbstractStraightLineTrajectory' has no 'segments' member (no-member)
flatsurf/geometry/straight_line_trajectory.py:502:34: E1101: Instance of 'AbstractStraightLineTrajectory' has no '_s' member (no-member)
flatsurf/geometry/straight_line_trajectory.py:508:44: E1101: Instance of 'AbstractStraightLineTrajectory' has no '_s' member (no-member)
************* Module flatsurf.geometry.matrix_2x2
flatsurf/geometry/matrix_2x2.py:90:23: E1120: No value for argument 'ncols' in constructor call (no-value-for-parameter)
flatsurf/geometry/matrix_2x2.py:90:23: E1120: No value for argument 'sparse' in constructor call (no-value-for-parameter)
flatsurf/geometry/matrix_2x2.py:90:23: E1120: No value for argument 'implementation' in constructor call (no-value-for-parameter)
************* Module flatsurf.geometry.translation_surface
flatsurf/geometry/translation_surface.py:73:15: E1120: No value for argument 'nb_fake_zeros' in constructor call (no-value-for-parameter)
flatsurf/geometry/translation_surface.py:75:4: E0213: Method '_canonical_first_vertex' should have "self" as first argument (no-self-argument)
************* Module flatsurf.geometry.finitely_generated_matrix_group
flatsurf/geometry/finitely_generated_matrix_group.py:213:17: E0602: Undefined variable 'identity_matrix' (undefined-variable)
flatsurf/geometry/finitely_generated_matrix_group.py:242:27: E1120: No value for argument 'ncols' in constructor call (no-value-for-parameter)
flatsurf/geometry/finitely_generated_matrix_group.py:242:27: E1120: No value for argument 'sparse' in constructor call (no-value-for-parameter)
flatsurf/geometry/finitely_generated_matrix_group.py:242:27: E1120: No value for argument 'implementation' in constructor call (no-value-for-parameter)
flatsurf/geometry/finitely_generated_matrix_group.py:252:23: E1120: No value for argument 'base_category' in constructor call (no-value-for-parameter)
Help with this is appreciated. See https://stackoverflow.com/a/29562085/812379 for how to ignore false positives.
@videlec @slel this is maybe a good example why linters are a good idea (doctests would also have found most of these of course.)
Documentation preview for this PR is ready! :tada: Built with commit: 84a1adec32e7486f77b84fabd3098e39730f11cb
Checklist
doc/news/
.doc/geometry
ordoc/graphical
. Nothing new