Skip to content

Commit

Permalink
Merge pull request #131 from briis/ruff
Browse files Browse the repository at this point in the history
Switch to ruff
  • Loading branch information
natekspencer authored Apr 4, 2024
2 parents 9555b5a + 91e0d92 commit e3a9225
Show file tree
Hide file tree
Showing 26 changed files with 60 additions and 252 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,23 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: poetry install
- name: Run linting
run: |
poetry run isort .
poetry run black . --check
poetry run flake8 pyweatherflowudp tests
poetry run pylint pyweatherflowudp
poetry run pydocstyle pyweatherflowudp tests
poetry run ruff check .
poetry run ruff format . --check
- name: Run mypy
run: poetry run mypy pyweatherflowudp
- name: Test with pytest
Expand Down
12 changes: 7 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"python.testing.pytestArgs": ["--pdb"],
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true,
"git.ignoreLimitWarning": false,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none"
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
1 change: 1 addition & 0 deletions demo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Demo"""

import asyncio
import logging

Expand Down
249 changes: 22 additions & 227 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,13 @@ Pint = ">=0.19"
PsychroLib = "^2.5.0"

[tool.poetry.group.test.dependencies]
black = ">=22.3,<24.0"
flake8 = "^5.0.4"
isort = "^5.10.1"
mypy = ">=0.991,<1.10"
pydocstyle = "^6.1.1"
pylint = ">=2.12.1,<4.0.0"
pytest = ">=7.1,<9.0"
pytest-asyncio = ">=0.20,<0.24"
pytest-cov = "^4.0.0"
pytest-timeout = "^2.0.1"
tox = "^4.0.18"
ruff = "^0.3"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
Loading

0 comments on commit e3a9225

Please sign in to comment.