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

Migrate to ruff #150

Merged
merged 10 commits into from
Feb 3, 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
6 changes: 0 additions & 6 deletions .bandit.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .bumpversion.cfg

This file was deleted.

10 changes: 0 additions & 10 deletions .coveragerc

This file was deleted.

16 changes: 0 additions & 16 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
tox -e py

- name: Upload coverage report
run: bash <(curl -s https://codecov.io/bash)
uses: codecov/codecov-action@v5
2 changes: 0 additions & 2 deletions .isort.cfg

This file was deleted.

21 changes: 5 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.10
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.4
hooks:
- id: bandit
args: [-r, -c, .bandit.yml]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/psf/black.git
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- id: ruff
args: [ --fix ]
- id: ruff-format
17 changes: 8 additions & 9 deletions cssselect/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
"""
CSS Selectors based on XPath
============================
CSS Selectors based on XPath
============================
This module supports selecting XML/HTML elements based on CSS selectors.
See the `CSSSelector` class for details.
This module supports selecting XML/HTML elements based on CSS selectors.
See the `CSSSelector` class for details.
:copyright: (c) 2007-2012 Ian Bicking and contributors.
See AUTHORS for more details.
:license: BSD, see LICENSE for more details.
:copyright: (c) 2007-2012 Ian Bicking and contributors.
See AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

Expand All @@ -27,10 +26,10 @@
"FunctionalPseudoElement",
"GenericTranslator",
"HTMLTranslator",
"parse",
"Selector",
"SelectorError",
"SelectorSyntaxError",
"parse",
)

VERSION = "1.2.0"
Expand Down
Loading