File: type_conflict.py

package info (click to toggle)
python-deepmerge 0.0.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 188 kB
  • sloc: python: 370; makefile: 195
file content (17 lines) | stat: -rw-r--r-- 477 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from .core import StrategyList


class TypeConflictStrategies(StrategyList):
    """ contains the strategies provided for type conflicts. """

    NAME = "type conflict"

    @staticmethod
    def strategy_override(config, path, base, nxt):
        """ overrides the new object over the old object """
        return nxt

    @staticmethod
    def strategy_use_existing(config, path, base, nxt):
        """ overrides the new object over the old object """
        return base