lark-parser / lark

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
MIT License
4.64k stars 397 forks source link

Remove unused `__path__` variable (also conflicts with internal Python use of __path__) #1338

Closed oraluben closed 10 months ago

oraluben commented 10 months ago

__path__ of a package is treated as iterable, whose elements are search paths of submodules.

The assignment here seems to not have any effect and could cause trouble during the importing. It could be [os.path.dirname(__file__)], but that's still the default value of the value.

__path__ must be an iterable of strings

https://docs.python.org/3/reference/import.html#module-path

erezsh commented 10 months ago

Sorry, accidentally broke this PR.

But your commit has been accepted into master.

Thanks!