Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin dacite version #177

Merged
merged 3 commits into from Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-update.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4.5.0
with:
python-version: "3.9"
python-version: "3.x"

- name: Install pre-commit
run: pip install pre-commit
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -12,7 +12,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -9,7 +9,7 @@ repos:
rev: v3.2.2
hooks:
- id: pyupgrade
args: [--py39-plus]
args: [--py310-plus]
- repo: https://github.com/ambv/black
rev: 22.10.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Maciej Bieniek
Copyright 2023 Maciej Bieniek

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
125 changes: 62 additions & 63 deletions brother/model.py
@@ -1,7 +1,6 @@
"""Type definitions for Brother."""
from dataclasses import dataclass
from datetime import datetime
from typing import Optional


@dataclass(frozen=True)
Expand All @@ -10,65 +9,65 @@ class BrotherSensors:

model: str
serial: str
belt_unit_remaining_life: Optional[int] = None
belt_unit_remaining_pages: Optional[int] = None
black_counter: Optional[int] = None
black_drum_counter: Optional[int] = None
black_drum_remaining_life: Optional[int] = None
black_drum_remaining_pages: Optional[int] = None
black_ink_remaining: Optional[int] = None
black_ink_status: Optional[int] = None
black_ink: Optional[int] = None
black_toner_remaining: Optional[int] = None
black_toner_status: Optional[int] = None
black_toner: Optional[int] = None
bw_counter: Optional[int] = None
color_counter: Optional[int] = None
cyan_counter: Optional[int] = None
cyan_drum_counter: Optional[int] = None
cyan_drum_remaining_life: Optional[int] = None
cyan_drum_remaining_pages: Optional[int] = None
cyan_ink_remaining: Optional[int] = None
cyan_ink_status: Optional[int] = None
cyan_ink: Optional[int] = None
cyan_toner_remaining: Optional[int] = None
cyan_toner_status: Optional[int] = None
cyan_toner: Optional[int] = None
drum_counter: Optional[int] = None
drum_remaining_life: Optional[int] = None
drum_remaining_pages: Optional[int] = None
drum_status: Optional[int] = None
duplex_unit_pages_counter: Optional[int] = None
firmware: Optional[str] = None
fuser_remaining_life: Optional[int] = None
fuser_unit_remaining_pages: Optional[int] = None
image_counter: Optional[int] = None
laser_remaining_life: Optional[int] = None
laser_unit_remaining_pages: Optional[int] = None
magenta_counter: Optional[int] = None
magenta_drum_counter: Optional[int] = None
magenta_drum_remaining_life: Optional[int] = None
magenta_drum_remaining_pages: Optional[int] = None
magenta_ink_remaining: Optional[int] = None
magenta_ink_status: Optional[int] = None
magenta_ink: Optional[int] = None
magenta_toner_remaining: Optional[int] = None
magenta_toner_status: Optional[int] = None
magenta_toner: Optional[int] = None
page_counter: Optional[int] = None
pf_kit_1_remaining_life: Optional[int] = None
pf_kit_1_remaining_pages: Optional[int] = None
pf_kit_mp_remaining_life: Optional[int] = None
pf_kit_mp_remaining_pages: Optional[int] = None
status: Optional[str] = None
uptime: Optional[datetime] = None
yellow_counter: Optional[int] = None
yellow_drum_counter: Optional[int] = None
yellow_drum_remaining_life: Optional[int] = None
yellow_drum_remaining_pages: Optional[int] = None
yellow_ink_remaining: Optional[int] = None
yellow_ink_status: Optional[int] = None
yellow_ink: Optional[int] = None
yellow_toner_remaining: Optional[int] = None
yellow_toner_status: Optional[int] = None
yellow_toner: Optional[int] = None
belt_unit_remaining_life: int | None = None
belt_unit_remaining_pages: int | None = None
black_counter: int | None = None
black_drum_counter: int | None = None
black_drum_remaining_life: int | None = None
black_drum_remaining_pages: int | None = None
black_ink_remaining: int | None = None
black_ink_status: int | None = None
black_ink: int | None = None
black_toner_remaining: int | None = None
black_toner_status: int | None = None
black_toner: int | None = None
bw_counter: int | None = None
color_counter: int | None = None
cyan_counter: int | None = None
cyan_drum_counter: int | None = None
cyan_drum_remaining_life: int | None = None
cyan_drum_remaining_pages: int | None = None
cyan_ink_remaining: int | None = None
cyan_ink_status: int | None = None
cyan_ink: int | None = None
cyan_toner_remaining: int | None = None
cyan_toner_status: int | None = None
cyan_toner: int | None = None
drum_counter: int | None = None
drum_remaining_life: int | None = None
drum_remaining_pages: int | None = None
drum_status: int | None = None
duplex_unit_pages_counter: int | None = None
firmware: str | None = None
fuser_remaining_life: int | None = None
fuser_unit_remaining_pages: int | None = None
image_counter: int | None = None
laser_remaining_life: int | None = None
laser_unit_remaining_pages: int | None = None
magenta_counter: int | None = None
magenta_drum_counter: int | None = None
magenta_drum_remaining_life: int | None = None
magenta_drum_remaining_pages: int | None = None
magenta_ink_remaining: int | None = None
magenta_ink_status: int | None = None
magenta_ink: int | None = None
magenta_toner_remaining: int | None = None
magenta_toner_status: int | None = None
magenta_toner: int | None = None
page_counter: int | None = None
pf_kit_1_remaining_life: int | None = None
pf_kit_1_remaining_pages: int | None = None
pf_kit_mp_remaining_life: int | None = None
pf_kit_mp_remaining_pages: int | None = None
status: str | None = None
uptime: datetime | None = None
yellow_counter: int | None = None
yellow_drum_counter: int | None = None
yellow_drum_remaining_life: int | None = None
yellow_drum_remaining_pages: int | None = None
yellow_ink_remaining: int | None = None
yellow_ink_status: int | None = None
yellow_ink: int | None = None
yellow_toner_remaining: int | None = None
yellow_toner_status: int | None = None
yellow_toner: int | None = None
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,2 +1,2 @@
dacite
dacite>=1.7.0
pysnmplib>=5.0.20
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -18,7 +18,7 @@ profile = black
# splits long import on multiple lines indented by 4 spaces profile = black

[mypy]
python_version = 3.9
python_version = 3.10
show_error_codes = true
follow_imports = silent
ignore_missing_imports = true
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Expand Up @@ -6,7 +6,7 @@

PROJECT_DIR = Path(__file__).parent.resolve()
README_FILE = PROJECT_DIR / "README.md"
VERSION = "2.1.1"
VERSION = "2.2.0"

setup(
name="brother",
Expand All @@ -21,15 +21,14 @@
package_data={"brother": ["py.typed"]},
zip_safe=True,
platforms="any",
python_requires=">=3.9",
python_requires=">=3.10",
install_requires=list(val.strip() for val in open("requirements.txt")),
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
@@ -1,11 +1,10 @@
[tox]
envlist = py39, py310, py311, lint, typing, coverage
envlist = py310, py311, lint, typing, coverage
skip_missing_interpreters = True

[gh-actions]
python =
3.9: py39, lint, typing, coverage
3.10: py310
3.10: py310, lint, typing, coverage
3.11: py311

[testenv]
Expand Down