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

Dependency upgrades #78

Merged
merged 2 commits into from
Apr 15, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- run: poetry install
- name: static analysis
run: |
poetry run black --check src tests
poetry run -- pre-commit run --all-files
poetry run mypy src tests
- name: run tests
run: |
Expand Down
8 changes: 2 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
repos:
- repo: https://github.com/psf/black
rev: "23.7.0"
hooks:
- id: black
language_version: python3.11
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.287"
rev: "v0.3.7"
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]
- id: ruff-format
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ Or by using the shell:
poetry shell
autotrash --help

All pull requests and master builds are tested using github actions and require [`black`](https://github.com/psf/black) formatting.
All pull requests and master builds are tested using github actions and require pre-commit to succeed.
847 changes: 409 additions & 438 deletions poetry.lock

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ classifiers = [
python = ">=3.8, <4"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.2"
black = "^23.7.0"
twine = "^4.0.2"
pytest = "^8.1.1"
twine = "^5.0.0"
mypy = "^1.5.1"
types-setuptools = "^68.2.0.0"
pre-commit = "^3.4.0"
ruff = "^0.0.287"
ruff = "^0.3.7"

[tool.poetry.scripts]
autotrash = 'autotrash.app:main'
Expand All @@ -29,10 +28,9 @@ autotrash = 'autotrash.app:main'
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 100
target-version = ['py311']

[tool.ruff]
src = ["src"]
line-length = 100
line-length = 100

[tool.ruff.lint]
extend-select = ["I"]
2 changes: 1 addition & 1 deletion src/autotrash/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from importlib.metadata import version, PackageNotFoundError
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version(__name__)
Expand Down
4 changes: 1 addition & 3 deletions src/autotrash/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,7 @@ def install_service(options, args):
[Service]
Type=oneshot
ExecStart="{}" {}
""".format(
executable_path, args
)
""".format(executable_path, args)

systemd_dir = os.path.expanduser("~/.config/systemd/user")
os.makedirs(systemd_dir, exist_ok=True)
Expand Down
1 change: 1 addition & 0 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import random
import tempfile
from typing import Dict

from autotrash import app

# ------------- mock functions & helpers --------------
Expand Down
Loading