You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we use this to convert expressions that are usually only a few and defined at development time, in code, and not at run time, and we limit the sizes of those caches (to 256), I think we could ignore this issue on those 2 lines. It feels like we are doing something similar to what the re module does when its method get strings instead of compiler patterns.
ruff detects that
@lru_cache
used onGenericTranslator.css_to_xpath()
andHTMLTranslator.css_to_xpath()
(added in #109) is not a good idea: "the global cache will retain a reference to the instance, preventing it from being garbage collected", we need to fix or ignore this. I think there are some singletons of these types and maybe we don't use other instances of them but this needs investigating.The text was updated successfully, but these errors were encountered: