Skip to content

Commit

Permalink
Ignore lazy_compilation for codecs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatal1ty committed Nov 15, 2023
1 parent 675783a commit dbb44a9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mashumaro/core/meta/code/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ def _add_unpack_method_lines_lazy(self, method_name: str) -> None:

def _add_unpack_method_lines(self, method_name: str) -> None:
config = self.get_config()
if config.lazy_compilation and self.allow_postponed_evaluation:
if (
config.lazy_compilation
and self.allow_postponed_evaluation
and self.is_nailed
):
self._add_unpack_method_lines_lazy(method_name)
return
try:
Expand Down Expand Up @@ -848,7 +852,11 @@ def _add_pack_method_lines_lazy(self, method_name: str) -> None:

def _add_pack_method_lines(self, method_name: str) -> None:
config = self.get_config()
if config.lazy_compilation and self.allow_postponed_evaluation:
if (
config.lazy_compilation
and self.allow_postponed_evaluation
and self.is_nailed
):
self._add_pack_method_lines_lazy(method_name)
return
try:
Expand Down

0 comments on commit dbb44a9

Please sign in to comment.