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

build(deps): add pydoclint #228

Merged
merged 2 commits into from
Jan 28, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
[flake8]
ignore = F821
ignore = DOC301, F821
max-complexity = 10
max-doc-length = 72
max-line-length = 88
max-line-length = 88
# pydoclint
style = google
arg-type-hints-in-signature = False
arg-type-hints-in-docstring = False
check-return-types = False
15 changes: 9 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 6.0.0
hooks:
- id: isort
- repo: https://github.com/coatl-dev/docformatter
Expand All @@ -28,15 +28,18 @@ repos:
rev: 6.3.0
hooks:
- id: pydocstyle
- repo: https://github.com/jsh9/pydoclint
rev: 0.6.0
hooks:
- id: pydoclint-flake8
- repo: https://github.com/coatl-dev/hadolint-coatl
rev: 2.12.1b0
hooks:
- id: hadolint
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
files: ^src/
types: [python]
Comment on lines 44 to 45
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (performance): Removing the src/ directory constraint for pylint might impact pre-commit hook performance

Consider keeping the files constraint to limit pylint to only the relevant source files

Suggested implementation:

        name: pylint
        entry: pylint
        language: system
        files: ^src/
        types: [python]

Note: If your source code is not in a src/ directory, you should adjust the files pattern to match your project's structure (e.g., ^your_package/ or similar).

- repo: https://github.com/coatl-dev/hadolint-coatl
rev: 2.12.1b0
hooks:
- id: hadolint
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ JYTHON_CACHE_DIR := $$HOME/.cache/jython

##@ Help

.PHONY: help clean check init install install-clean install-force install-nocache install-nodeps
.PHONY: help clean check init install cleaninstall forceinstall nocacheinstall nodepsinstall

help: ## Display this help message.
@awk \
Expand Down Expand Up @@ -44,18 +44,18 @@ install: check init ## Install this package using Jython with caching enabled.
@echo "Installing package…"
jython -m pip install --cache-dir="$(JYTHON_CACHE_DIR)" .

install-clean: check init clean ## Perform clean installation using Jython with caching enabled.
cleaninstall: check init clean ## Perform clean installation using Jython with caching enabled.
@echo "Running clean install…"
jython -m pip install --cache-dir="$(JYTHON_CACHE_DIR)" .

install-force: check init ## Reinstall all packages using Jython even if they are already up-to-date.
forceinstall: check init ## Reinstall all packages using Jython even if they are already up-to-date.
@echo "Reinstalling all packages…"
jython -m pip install --force-reinstall --cache-dir="$(JYTHON_CACHE_DIR)" .

install-nocache: check ## Install this package using Jython with caching disabled.
nocacheinstall: check ## Install this package using Jython with caching disabled.
@echo "Installing packages (no cache)…"
jython -m pip install --no-cache-dir .

install-nodeps: check ## Install this package without dependencies.
nodepsinstall: check ## Install this package without dependencies.
@echo "Installing package without dependencies…"
jython -m pip install --no-deps .
5 changes: 4 additions & 1 deletion src/incendium/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ def __enter__(self):

Raises:
IOError: If the connection's status reports as Faulted, or
ir cannot be enabled.
it cannot be enabled.

Returns:
DisposableConnection: The current instance.
"""
system.db.setDatasourceEnabled(self._database, True)

Expand Down