Comments (2)
Background: I started adding type annotations because I liked them better than comments. Not sure how they can be used in python to verify correctly typed data.
I am honestly not sure about how to follow up on this. E.g.,
- We could introduce static type checks, either while running the program or during continuous integration. For example, after quick googling, I found mypy, which people are using to perform type checking.
- I found that some articles argued against static type checks in favor of duck typing. Sure, we could introduce ducky type checks, but they would probably add many lines of code, making refactorings more difficult, without a lot of benefit.
- Or else we could drop the type declarations altogether and simply throw runtime errors if data does not match the program's expectations. But I like type declarations for documentation purposes.
from smart_importer.
Afaict setting up static type checking is not trivial since it needs to know the types of structures from the dependencies too. However, if we want any kind of type checking, static is the way to go.
If they're just for documentation purposes, I'd be for having fewer of them and in particular not having them in places where it's absolutely obvious (like transaction
being, well, a list of Transaction
objects).
from smart_importer.
Related Issues (20)
- pylint fails, tox depends on wrong version of beancount? HOT 3
- Expose ImporterHook interface HOT 4
- Allow custom getters for attributes HOT 2
- Predict postings with amounts HOT 3
- Predict metadata (and tags) HOT 3
- Package working with python 3.6.12 but not with python 3.9 HOT 26
- ImportError undefined symbol _PyGen_Send HOT 2
- Unable to use smart_importer with beangulp Importers HOT 6
- release a v0.4 to pypi HOT 2
- How to pass in existing entries as training data other than the current bean file HOT 10
- Using `file_account()` to filter training data doesn't work for certain use cases HOT 4
- TAGS HOT 2
- pylint error, cannot import beancount.core.data HOT 1
- test failure due to invalid syntax HOT 5
- Checker for potential mistakes HOT 1
- Passing too many arguments to extract() HOT 1
- I can't manage to have smart_importer working HOT 6
- Remove suggestions because suggest=True adds list as metadata which is invalid HOT 7
- Bypass specific transactions. HOT 4
- please provide the hook helpers as an own package HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smart_importer.