This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Parent | |
... | |
@classmethod | |
def __init_subclass__(cls, **kwargs): | |
dir_subclass = set(field for field in dir(cls) if not field.startswith(f"_{cls.__name__}__")) | |
dir_base = set(field for field in dir(cls.__base__)) | |
extra_dir = dir_subclass.difference(dir_base) | |
if extra_dir: | |
raise CellCantHasExtraFieldException( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import abstractmethod | |
from typing import Protocol, Callable, Any, runtime_checkable | |
@runtime_checkable | |
class LoggerProtocol(Protocol): | |
@abstractmethod | |
def echo(self, msg: str) -> None: | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Child (UploadFileComponent.vue) | |
// TODO: finish setActive and setInactive methods | |
<template> | |
<div | |
id="upload-zone" | |
class="col-1 mt-2 py-5 border w-100 bg-light rounded" | |
@dragover.prevent | |
@dragenter="setActive" | |
@dragleave="setInactive" |