change dict unpack to ChainMap

This commit is contained in:
Frank DeMarco 2020-08-21 15:03:02 -04:00
parent 6f8985d3f4
commit c26f438bfb
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import os, re, shutil, pygame, sys
import os, re, shutil, pygame, sys, collections
from .GameChild import *
from .Sprite import *
@ -869,7 +869,7 @@ class AudioPanelButton(Sprite):
pos.move(-container.location.left, -container.location.top)
if self.collide(pos):
if self.pass_mods:
kwargs = dict(**self.callback_kwargs, **{"mods": pygame.key.get_mods()})
kwargs = collections.ChainMap(self.callback_kwargs, {"mods": pygame.key.get_mods()})
else:
kwargs = self.callback_kwargs
self.callback(**kwargs)