Skip to content

Commit

Permalink
Merge pull request #5 from koenvervloesem/exceptions
Browse files Browse the repository at this point in the history
Add custom exceptions for this package
  • Loading branch information
koenvervloesem committed Dec 22, 2022
2 parents b2a4784 + fb763d0 commit a110b00
Show file tree
Hide file tree
Showing 20 changed files with 36,591 additions and 36,168 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ repos:
## You can add flake8 plugins via `additional_dependencies`:
# additional_dependencies: [flake8-bugbear]

- repo: https://github.com/pycqa/pylint
rev: v2.15.9
hooks:
- id: pylint
additional_dependencies:
- jinja2
- pytest

- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
Expand Down
3 changes: 3 additions & 0 deletions scripts/generate_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def generate_uuid_module(
"""
template = env.get_template(UUID_TEMPLATE)
with (Path(CODE_DIR) / f"{kind}s.py").open("w") as python_file:
python_file.write("# pylint: skip-file\n")
python_file.write(
template.render(uuids16=uuid16_dict, uuids128=uuid128_dict, uuid_dict=kind)
)
Expand All @@ -96,6 +97,7 @@ def generate_cic_module(cic_dict: Dict[str, str]) -> None:
"""Generate Python module for Company ID Codes."""
template = env.get_template(CIC_TEMPLATE)
with (Path(CODE_DIR) / "companies.py").open("w") as python_file:
python_file.write("# pylint: skip-file\n")
python_file.write(template.render(cics=cic_dict))


Expand All @@ -119,6 +121,7 @@ def generate_oui_module(oui_dict: Dict[str, str]) -> None:
"""Generate Python module for OUIs."""
template = env.get_template(OUI_TEMPLATE)
with (Path(CODE_DIR) / "ouis.py").open("w") as python_file:
python_file.write("# pylint: skip-file\n")
python_file.write(template.render(ouis=oui_dict))


Expand Down
1 change: 1 addition & 0 deletions src/bluetooth_numbers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: skip-file
"""bluetooth-numbers
Python package with a wide set of numbers related to Bluetooth
Expand Down
4 changes: 3 additions & 1 deletion src/bluetooth_numbers/characteristics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: skip-file
"""Module with UUIDs and names for Bluetooth characteristics.
Usage:
Expand All @@ -9,9 +10,10 @@
>>> characteristic[UUID("6E400002-B5A3-F393-E0A9-E50E24DCCA9E")]
'UART RX Characteristic'
"""
# pylint: skip-file
from uuid import UUID

from .utils import UUIDDict
from bluetooth_numbers.dicts import UUIDDict

characteristic = UUIDDict(
{
Expand Down

0 comments on commit a110b00

Please sign in to comment.