john-bodley commented on a change in pull request #16227:
URL: https://github.com/apache/superset/pull/16227#discussion_r688244210
##########
File path: requirements/base.in
##########
@@ -18,3 +18,15 @@
-e file:.
pyrsistent>=0.16.1,<0.17
zipp==3.4.1
+
+# stubs
Review comment:
Do we need these after the update to pre-commit?
##########
File path: .pre-commit-config.yaml
##########
@@ -24,9 +24,10 @@ repos:
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v0.790
+ rev: v0.910
hooks:
- id: mypy
+ additional_dependencies: [types-all]
Review comment:
@villebro this is what we did at Airbnb as well. It's a real shame that
Mypy doesn't install these by default if needed.
##########
File path: superset/typing.py
##########
@@ -57,7 +57,7 @@ class AdhocMetricColumn(TypedDict, total=False):
class AdhocMetric(TypedDict, total=False):
aggregate: str
column: Optional[AdhocMetricColumn]
- expressionType: str
+ expressionType: Literal["SIMPLE", "SQL"]
Review comment:
I guess this is screaming out to be an enum. Definitely a future TODO.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]