-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from AlTosterino/feature/minor-stuff
Small refactor of existing code
- Loading branch information
Showing
5 changed files
with
160 additions
and
81 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "lidipy" | ||
version = "0.1.1" | ||
version = "0.2.0" | ||
description = "Lidi is a lightweight dependency injector designed to simplify dependency management in your Python projects." | ||
authors = ["AlTosterino <[email protected]>"] | ||
readme = "README.md" | ||
|
@@ -11,10 +11,10 @@ python = "^3.11" | |
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
ruff = "^0.0.261" | ||
black = "^23.3.0" | ||
pytest = "^7.3.0" | ||
mypy = "^1.2.0" | ||
ruff = "~0" | ||
black = "~24" | ||
pytest = "~8" | ||
mypy = "~1" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
|
@@ -39,6 +39,13 @@ check_untyped_defs = true | |
ignore_missing_imports = true | ||
|
||
[tool.ruff] | ||
select = ["E", "F", "I", "PL"] | ||
line-length = 100 | ||
target-version = "py311" | ||
line-length = 110 | ||
target-version = "py311" | ||
|
||
[tool.ruff.lint] | ||
select = ["E", "F", "I", "PL", "N", "S", "B", "A", "TD", "FIX", "PERF", "PT"] | ||
ignore = ["D107", "D203", "D211"] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"__init__.py" = ["E402", "D104"] | ||
"**/{tests,docs,tools}/**" = ["D100", "D101", "D103", "S101"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
class BaseLidiException(Exception): | ||
"""Exceptions module for the Lidi framework. | ||
Defines custom exceptions used within the Lidi framework. | ||
""" | ||
|
||
|
||
class BaseLidiException(Exception): # noqa: N818 | ||
"""Base class for all Lidi exceptions.""" | ||
|
||
... | ||
|
||
|
||
class BindingMissing(BaseLidiException): | ||
"""Raise when binding is not found within Lidi container.""" | ||
|
||
pass |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,31 @@ | ||
from dataclasses import dataclass | ||
|
||
|
||
class SimpleClassA: | ||
... | ||
class SimpleClassA: ... | ||
|
||
|
||
class SimpleClassB: | ||
... | ||
class SimpleClassB: ... | ||
|
||
|
||
class SimpleClassC: | ||
... | ||
class SimpleClassC: ... | ||
|
||
|
||
class SimpleBaseClass: | ||
... | ||
class SimpleBaseClass: ... | ||
|
||
|
||
class SimpleInheritClassA(SimpleBaseClass): | ||
... | ||
class SimpleInheritClassA(SimpleBaseClass): ... | ||
|
||
|
||
class SimpleInheritClassB(SimpleBaseClass): | ||
... | ||
class SimpleInheritClassB(SimpleBaseClass): ... | ||
|
||
|
||
@dataclass | ||
class SimpleDataclassA: | ||
... | ||
class SimpleDataclassA: ... | ||
|
||
|
||
@dataclass | ||
class SimpleDataclassB: | ||
... | ||
class SimpleDataclassB: ... | ||
|
||
|
||
@dataclass | ||
class SimpleDataclassC: | ||
... | ||
class SimpleDataclassC: ... |