add schema as data to database; #139
Conversation
Schema optim
|
|
||
|
|
||
| class FileTable(Base): | ||
| class FileTable(Base): # type: ignore |
There was a problem hiding this comment.
Throughout this PR, I noticed that there are a lot of type checks that are being ignored. Why is that?
Type checks can be annoying so I get it, but I think best practice is just to resolve them since they can be important in catching bugs / runtime exceptions. Doing some quick research, it looks like you can use from sqlalchemy.orm import DeclarativeBase with SQLAlchemy 2.0+ instead of declarative_base(), which could help with the type errors.
There was a problem hiding this comment.
yeah I tried that it's not working, also these are codes from google fellows, whenever i make a tiny little change it raises the errors again, I need to specify a new version of sqlalchemy for it to go away, that's why is set it to ignore
There was a problem hiding this comment.
Yeah type check errors can be really persistent and annoying. Do you mind if I give a shot at resolving them? I can pull down your branch and take a look at VS code.
There was a problem hiding this comment.
yeah that's totally fine
There was a problem hiding this comment.
ok I think I got it for the most part, so I'll hit approve. We still are ignoring types in the unit test, but I think it's ok since it's just a unit test.
changes
context
questions