Simon J Knibbs

Results 10 issues of Simon J Knibbs

### Describe the issue you are experiencing I'm currently unable to use the CEC Scanner addon and/or the hdmi_cec integration despite updating to the latest OS version. Although the kernel...

bug
board/raspberrypi
stale

Task to add python 3.10 to the tox tests and to fix any resulting issues.

In #62 basic support for 'Final' types was added. However the following form, which defines a constant vaued field is not currently supported: ```python @dataclass class Rectangle(JsonSchemaMixin): max_width: Final =...

enhancement

Due to the way that `$allOf` and `additionalProperties` [interact in json schema](https://json-schema.org/understanding-json-schema/reference/combining.html?highlight=allof#allof), currently, a schema that validates against nothing will be generated in the following case: ```python @dataclass class Pet(JsonSchemaMixin):...

bug

It seems the latest release of [fastjsonschema](https://github.com/horejsek/python-fastjsonschema) now raises an error when using custom string formats: ``` elif format_ == 'regex': with self.l('try:'): self.l('re.compile({variable})') with self.l('except Exception:'): self.exc('{name} must be...

bug

[black](https://github.com/psf/black) seems to be the standard tool for formatting python code now. Let's add it to the CI build and reformat the code with it.

It seems that the typing module doesn't flatten nested literal type definitions, so the following does not currently work: ```python SuccessStatus = Literal[200, 201, 204] ClientError = Literal[404, 401, 403,...

enhancement
good first issue

The following is not currently supported which is valid according to [PEP-586](https://www.python.org/dev/peps/pep-0586/#legal-parameters-for-literal-at-type-check-time) ```python class Color(Enum): RED, GREEN, BLUE, PURPLE @dataclass class ColorInfo(JsonSchemaMixin): primary_color: Literal[Color.RED, Color.GREEN, Color.BLUE] ... ```

enhancement

It would useful to be able to include examples in the generated json schema. I can think of a couple of ideas for implementing this: 1. Add an examples classmethod...

enhancement