Skip to content

Commit ca993f2

Browse files
Adding Ruff Lint: adding missing docstrings, improving consistency, updating README
1 parent 00c2cb8 commit ca993f2

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/pylint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Pylint
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.8", "3.9", "3.10"]
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v3
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install pylint
21+
- name: Analysing the code with pylint
22+
run: |
23+
pylint $(git ls-files '*.py')

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dev = [
2222
[tool.ruff]
2323
target-version = "py313"
2424
line-length = 120
25+
2526
exclude = ["data/mysql"]
2627

2728
[tool.ruff.lint]

src/WikidataLabel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040

4141
class WikidataLabel(Base):
42-
"""Database-backed cache for multilingual Wikidata labels."""
42+
"""Database cache for multilingual Wikidata labels."""
4343

4444
__tablename__ = 'labels'
4545
id = Column(String(64), primary_key=True)
@@ -58,7 +58,7 @@ def initialize_database():
5858

5959
@staticmethod
6060
def add_bulk_labels(data):
61-
"""Insert or update multiple label records in one transaction.
61+
"""Insert or update multiple label records.
6262
6363
Args:
6464
data (list[dict]): Records containing at least ``id`` and ``labels`` keys.

0 commit comments

Comments
 (0)