django-hordak
django-hordak copied to clipboard
CI: Remove flake & mypy?
Just throwing this out there for discussion. I love black, but using flake in addition just seems to throw up a bunch of noise that I don't think really makes much difference to code quality (it mostly just results in # noqa comments for me).
mypy is also being a bit of an irritant too. I did catch an error in a type annotation, but other than that it was (IMHO) just noise:
hordak/admin.py:51: error: "Callable[[AccountAdmin, Any], Any]" has no attribute "admin_order_field" [attr-defined]
hordak/management/commands/create_benchmark_transactions.py:36: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
hordak/management/commands/create_benchmark_transactions.py:37: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
hordak/management/commands/create_benchmark_transactions.py:38: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
hordak/management/commands/create_benchmark_transactions.py:39: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
hordak/management/commands/create_benchmark_transactions.py:40: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
hordak/management/commands/create_benchmark_transactions.py:82: error: Syntax error in type annotation [syntax]
hordak/management/commands/create_benchmark_transactions.py:82: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn)
hordak/forms/transactions.py:178: error: Need type annotation for "source_account" [var-annotated]
hordak/forms/transactions.py:182: error: Need type annotation for "trading_account" [var-annotated]
hordak/forms/transactions.py:191: error: Need type annotation for "destination_account" [var-annotated]
hordak/forms/statement_csv_import.py:13: error: Need type annotation for "bank_account" [var-annotated]
hordak/views/transactions.py:65: error: Definition of "object" in base class "DeletionMixin" is incompatible with definition in base class "BaseDetailView" [misc]
How helpful do other people find these two tools though?
UPDATE: I'd also be happy to replace these with automatic tools such as (example). It isn't the changes I object to, rather it's the manual drudgery of having to follow rules that I'm not really sure I agree with.
I've removed mypy as part of #127 (4a15aa1a9ff4ad4d9ead874c86f26ce1200ab9fd), because god help me.
Commit message:
Removing mypy. We're all consenting adults here. Let's catch these issues using our IDEs or in PR review. Black catches most of it anyway, #125