Skip to content

Commit

Permalink
Update ruff to >= 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rkhwaja committed Mar 8, 2024
1 parent 8c32141 commit 596dc14
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9, "3.10", "3.11", "3.12.0"]
python-version: [3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ env.bat
.idea
.venv
.vscode
.coverage
coverage.xml
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ pytest = ">=7.1"
pytest-cov = ">=2.10.1"
pytest-asyncio = ">=0.16.0"
poethepoet = ">=0.16.4"
ruff = ">=0.0.289"
ruff = ">=0.3.1"

[tool.poe.tasks]
lint = "ruff src tests"
lint = "ruff check src tests"

[tool.poe.tasks.test]
shell = """
Expand All @@ -50,14 +50,14 @@ coverage xml

[tool.ruff]
line-length = 200
ignore = ["A003", "ANN", "B011", "D", "DTZ", "EM", "FBT003", "FIX002", "I", "N", "PT013", "PT015", "PTH123", "S101", "TCH", "TD", "TRY003", "W191"]
select = ["ALL"]
lint.ignore = ["A003", "ANN", "B011", "D", "DTZ", "EM", "FBT003", "FIX002", "I", "N", "PT013", "PT015", "PTH123", "S101", "TCH", "TD", "TRY003", "W191"]
lint.select = ["ALL"]

[tool.ruff.extend-per-file-ignores]
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = ["F403"]
"tests/*" = ["INP001"]

[tool.ruff.flake8-quotes]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
multiline-quotes = "single"

Expand Down
2 changes: 1 addition & 1 deletion src/wccls/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _ProcessLogin(self, response):
loginForm = soup.find_all('form', class_='loginForm')[0]
formData = {}
for input_ in loginForm.find('input'):
formData[input_.attrs['name']] = input_.attrs['value'] if 'value' in input_.attrs else ''
formData[input_.attrs['name']] = input_.attrs.get('value', '')
formData['user_pin'] = self._password
formData['name'] = self._login
loginAction = loginForm.attrs['action']
Expand Down

0 comments on commit 596dc14

Please sign in to comment.