-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Is your feature request related to a problem? Please describe.
I get the error:
error: Call to untyped function "apply" in typed context [no-untyped-call]
if I use run.groupby(…).apply(…)
. That's a bit sad.
Describe the solution you'd like
It would be great to add type information to RunGroupBy.apply()
, however that's not really possible because there would be a dependency cycle: run.groupby()
returns a RunGroupBy
object (and therefore has to import scmdata.groupby
), and RunGroupBy.apply()
return an ScmRun
object (and therefore has to import scmdata.run
).
I'm not sure how to properly solve this.
Describe alternatives you've considered
We could:
- dump everything into one file, no dependency cycles ever
Protocol
ize ScmRun. Sounds painful and like a lot of work, but would decouple implementation and types clearly.Protocol
ize RunGroupBy. Probably less work, but I'm not sure ifrun.py
can live without importingscmdata.groupby
, so probably doesn't break the cycle?- Other ideas?
Metadata
Metadata
Assignees
Labels
No labels