beancount / beangulp

Importers framework for Beancount
GNU General Public License v2.0
59 stars 23 forks source link

ingest.cache._FileMemo should be public #13

Closed blais closed 3 years ago

blais commented 5 years ago

Original report by Balázs Keresztury (Bitbucket: belidzs, GitHub: belidzs).


Implementing an importer.ImporterProtocol usually involves using method parameters with the type ingest.cache._FileMemo but this class is currently protected.

In my opinion this class should be public since it is used extensively outside of the beancount.ingest package and it also causes code inspection errors when static typing is employed to enhance IDE code inspection (and type safety of course).

#!python

    def identify(self, file: cache._FileMemo) -> bool:
            return True
blais commented 3 years ago

Won't do