Skip to content

Commit

Permalink
Merge pull request #22 from ErikKalkoken/refactoring
Browse files Browse the repository at this point in the history
Refactoring & add pylint checks
  • Loading branch information
ErikKalkoken authored Sep 3, 2023
2 parents 754d546 + 576828d commit 34c8fd2
Show file tree
Hide file tree
Showing 17 changed files with 1,055 additions and 901 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@ jobs:
- name: Run Pre Commit Checks
uses: pre-commit/action@v3.0.0

pylint:
name: Pylint check
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@main

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install tox
- name: Test with tox
run: tox -e pylint

test:
runs-on: ubuntu-latest
strategy:
Expand All @@ -35,7 +54,6 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Added support for Python 3.11
- Add GH actions for test and release
- Add pylint checks to CI pipeline

### Changed

- Consolidated tests.helper package into module
- Migrate build process to PEP 621
- Removed support for Python 3.7
- Remove TEST mode

## [1.4.0] - 2022-04-04

Expand Down
4 changes: 2 additions & 2 deletions fpdf_mod/fpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,10 +1273,10 @@ def image(
return info

@check_page
def ln(self, h=""):
def ln(self, h=None):
"Line Feed; default value is last cell height"
self.x = self.l_margin
if isinstance(h, basestring):
if h is None:
self.y += self.lasth
else:
self.y += h
Expand Down
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ ignore-patterns = ["__init__.py"]
ignore-paths = ["^.*/tests/.*$", "^.*/fpdf_mod/.*$"]

[tool.pylint.'BASIC']
good-names = ["i", "j", "k", "ex"]
good-names = ["i", "j", "k", "ex", "x1", "x2", "x3", "x4", "y1", "y2"]

[tool.pylint.'FORMAT']
max-line-length = 120


[tool.pylint.'MESSAGES CONTROL']
disable = [
"too-many-arguments",
"too-few-public-methods",
"too-many-instance-attributes",
]
Loading

0 comments on commit 34c8fd2

Please sign in to comment.